Skip to content

Commit

Permalink
move this._mapService.zoomToGeometry after start toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
volterra79 committed Jan 12, 2023
1 parent b660b0d commit 256aecd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions services/editingservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ proto.editResultLayerFeature = function({layer, feature}={}){
map.getView().setResolution(resolution);
}
});
// zoom to feature geometry
this._mapService.zoomToGeometry(feature.geometry);
}
// start toolbox
toolBox.start({
Expand All @@ -282,6 +280,7 @@ proto.editResultLayerFeature = function({layer, feature}={}){
.then(({features=[]}) => {
const feature = features.find(feature => feature.getId() == featureId);
if (feature){
feature.getGeometry() && this._mapService.zoomToGeometry(feature.getGeometry());
toolBox.setSelected(true);
const session = toolBox.getSession();
this.setSelectedToolbox(toolBox);
Expand Down

0 comments on commit 256aecd

Please sign in to comment.