Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #2073
Adds a new button to the editor toolbar with modify tools that is activated when the correct geometry for that tool is selected. Currently the only available tool is split-line-by-point, which does just that: select a line feature, select the split tool and click where on the selected line it should be split. It cuts the original feature and creates a new with the rest of the line. The copy gets all attributes from the original feature (except id).
To activate the modify tools menu the editor control must be configured with:
"modifyTools": true
The configuration is only on editor level for now. In the future one could imaging having it on layer level as well or specify which tools are available.
As a bonus Edithandler and EditToolbar are rewritten as Components so they can emit events as I didn't wanted to follow the pattern the way the editor toolbar uses DOM events.