-
Notifications
You must be signed in to change notification settings - Fork 84
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
Implement Junction Finder #434
Conversation
Signed-off-by: Guillaume Fontorbe <[email protected]>
Signed-off-by: Guillaume Fontorbe <[email protected]>
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.
Thanks!
In which example have you tested the new feature? Maybe we can extend the "Random Graph" example so that some edges are randomly assigned to the same port?
I modified the random graph example to fit my needs, I could probably find time to work on modifying the example to include optional junction points |
Co-authored-by: Miro Spönemann <[email protected]>
Signed-off-by: Guillaume Fontorbe <[email protected]>
Signed-off-by: Guillaume Fontorbe <[email protected]>
Signed-off-by: Guillaume Fontorbe <[email protected]>
Signed-off-by: Guillaume Fontorbe <[email protected]>
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.
packages/sprotty/src/features/edge-junction/junction-postprocessor.ts
Outdated
Show resolved
Hide resolved
That's the same issue that has been reported in #427. Bend points are not removed so you end up with funky edges. Usually happens when you show/hide junction points several times without reloading the page. First render seems to work fine most of the time on my end. |
Signed-off-by: Guillaume Fontorbe <[email protected]>
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.
👍
Solves #420
Adds a new feature to find junction points on edges with the same source or target.
Similar to the
IntersectionFinder
, we provide aContainerModule
that can be loaded when needed in the inversify container.The
JunctionFinder
ultimately sets theisJunction
flag totrue
onRoutingPoint
s where a junction point must be drawn.The rendering is done in the
PolylineEdgeView
(and therefore views that inherit this view) in a new functionrenderFunctionPoints
.They are represented as circles with a class
sprotty-junction
for easy styling.