Custom logic for positioning link labels

Hi, I would like for users to be able to drag link label nodes, and then recalculate a link’s bezier points based on the new position of the label node. It appears that the other way around is the default behavior – changing points recalculates the position of the label node.

I have looked at segmentOffset and related properties, but ideally I think I’d like to override the code that takes those properties into account. Is there some way to add custom logic to define how link label nodes are positioned? Maybe a method in Panel.Link ?

First, I want to make sure that you and other readers have seen two different extensions:

Would either of these satisfy your requirements, or do you need to adapt one of them?

I have investigated both of those extensions, but neither is quite what I am looking for. I’d like the user to be able to drag the label node itself (not a handle), and as they drag, create a custom geometry for the link shape based on the position of the label node. So while the dragging is happening, I’d want the Panel.Link to leave the label node alone, and make the curve suit the position of the node, rather than re-placing the node on the curve as its points change.

This sample may actually be closer to what I’m looking for: Multi-Node Path Links, but I want a single intermediary node, which would be a link label rather than a top-level node. Once I make that a link label though, I no longer have free reign when I’m dragging because I suspect as I drag, the Panel.Link is fighting with me to position it back into the middle of the link.

My suggestion is to try modifying the LinkLabelDraggingTool to change the link route in the same manner that the CurvedLinkReshapingTool does, rather than modifying the label’s GraphObject.segmentOffset.

Basically, it’s a matter of adapting the reshape method of the CurvedLinkReshapingTool to replace the updateSegmentOffset of the LinkLabelDraggingTool.