Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit split line tool #2124

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

steff-o
Copy link
Contributor

@steff-o steff-o commented Jan 10, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cut line in edit
1 participant