Allow extending multi-selection with Shift while preventing duplicate…#12008
Open
Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Open
Allow extending multi-selection with Shift while preventing duplicate…#12008Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Shyam-123pandey wants to merge 2 commits intoopenstreetmap:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves lasso multi-selection in iD editor by merging newly lasso-selected entities with the existing selection when Shift is held, rather than replacing the selection. It addresses issue #11134 which requested the ability to incrementally build multi-selections.
Changes:
- Modified
behaviorLasso'spointeruphandler to accept the event parameter and merge current selection with new lasso selection when Shift is held, usingSetfor deduplication. - Removed a blank line in
modules/modes/select.js(cosmetic).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| modules/behavior/lasso.js | Added Shift-aware selection merging in lasso pointerup handler |
| modules/modes/select.js | Removed a blank line (cosmetic only) |
You can also share your feedback on Copilot code review. Take the survey.
Contributor
Author
|
Hello Sir @tyrasd please check PR and i have one doubt in reply section, please tell there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change improves multi-selection usability by allowing users to extend the
current selection using Shift + click and Shift + lasso.
Vedio of fixes: https://drive.google.com/file/d/13wMn-91atIUZN0aL4xTrUWcIgXCHHrDE/view?usp=sharing
Previously, new selections would replace the existing selection, making it
difficult to incrementally build a multi-selection.
The implementation merges the current selection (
context.selectedIDs())with the newly selected IDs while ensuring uniqueness using
Set()to avoidduplicate entity IDs.
Behavior after this change:
This addresses usability issue #11134.