Skip to content

Commit

Permalink
Enable select tool after switching from add to edit feature
Browse files Browse the repository at this point in the history
  • Loading branch information
geertplaisier committed May 16, 2024
1 parent 2d6df35 commit f6f034d
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ export class PlanregistratiesMapComponent implements OnInit {
withLatestFrom(this.mapService.getToolManager$()),
)
.subscribe(([ isCreatingNew, toolManager ]) => {
if (!this.addFeatureTool) {
if (!this.addFeatureTool || !this.selectTool) {
return;
}
if (isCreatingNew) {
toolManager.disableTool(this.selectTool.id, true);
toolManager.enableTool<DrawingEnableToolArguments>(this.addFeatureTool.id, true, { type: 'area' });
} else {
toolManager.disableTool(this.addFeatureTool.id, false);
toolManager.disableTool(this.addFeatureTool.id, true);
toolManager.enableTool(this.selectTool.id, false);
}
});
this.planregistratieService.hasChanges$()
Expand Down

0 comments on commit f6f034d

Please sign in to comment.