- Notifications
You must be signed in to change notification settings - Fork1.4k
WiP feat: link external label with its parent#2328
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:develop
Are you sure you want to change the base?
Conversation
LabelLink.$inject = [ 'eventBus', 'canvas' ]; | ||
// TODO: Works kinda weird with complicated sequence flows. | ||
function getMiddle(element) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
What you want to use isLineIntersection#getApproxIntersection(waypoints, reference)
or a derivative. This gives you the closest anchor point, either on a bendpoint, or on the connection itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This looks great:
- self contained
- simple enough
- working well
Looking forward for the follow-up to get it into the tool. One thing to consider: Whether to make it an (optional) diagram-js feature. I see that other tools, i.e. dmn-js, may benefit from it, too.
Related tocamunda/camunda-modeler#369
Proposed Changes
Show a dotted link between an external label and its parent when it's selected.
To do
Try
Run
npm start
on this branch and try it out.Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}