fix(snapping): allow label snapping inside participants and lanes#2401
Open
sahilforkshere wants to merge 3 commits intobpmn-io:developfrom
Open
fix(snapping): allow label snapping inside participants and lanes#2401sahilforkshere wants to merge 3 commits intobpmn-io:developfrom
sahilforkshere wants to merge 3 commits intobpmn-io:developfrom
Conversation
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.
Fixes #2371
Root Cause: > FixHoverBehavior.js:49 forces the hover target to the root element whenever a label is being moved. In a collaboration diagram, the root is the collaboration element whose direct children are only participants — not the gateway/event shapes inside them. So getSnapTargets returned an empty set for labels inside participants, making alignment snap lines invisible.
Fix: > In BpmnCreateMoveSnapping.js, the getSnapTargets method now detects when the moving shape is a label whose actual parent differs from the forced root target (shape.labelTarget && shape.parent !== target). In that case, it additionally collects siblings from the label's real parent container (the lane/participant), merging them into the snap target list. This gives the snapping system access to the label's siblings (other labels, the labelTarget gateway/event, etc.), restoring the alignment helpers inside participants and lanes.