Bind port on edge anchor and apply it on every nodes/edges change. #1851
-
Hi, I'm searching a way to bind the position of a port on a point of the edge targeting a node. I have :
So far I ended up calculating the coordinates of the anchor and applied them to the port, but I'm not sure about the best option to do this. this.node.prop('ports/groups/group1/position', {
name: "absolute",
args: {
x: this.graph.findViewByCell(edge1.id).targetPoint.x - this.node.position().x,
y: this.graph.findViewByCell(edge1.id).targetPoint.y - this.node.position().y
},
}) I would like to apply this method every time the nodes/edges move. Also, this method seems quite slow and doesn't consider the circle to correctly map the port on the edge... Any ideas ? Thanks for your help and this awesome library! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I wrote a demo with a different idea,take a look if you're interested. |
Beta Was this translation helpful? Give feedback.
I wrote a demo with a different idea,take a look if you're interested.