Skip to content

fix(snapping): allow label snapping inside participants and lanes#2401

Open
sahilforkshere wants to merge 3 commits intobpmn-io:developfrom
sahilforkshere:develop
Open

fix(snapping): allow label snapping inside participants and lanes#2401
sahilforkshere wants to merge 3 commits intobpmn-io:developfrom
sahilforkshere:develop

Conversation

@sahilforkshere
Copy link
Copy Markdown

@sahilforkshere sahilforkshere commented Mar 21, 2026

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.

@sahilforkshere sahilforkshere requested review from a team, Buckwich and ev-codes March 21, 2026 20:10
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 21, 2026

CLA assistant check
All committers have signed the CLA.

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.

Alignment tools for labels don't work inside of participant/lane

2 participants