Pink Linking Box Not Rotating

I’ve noticed in my application that the pink box that appears when linking to/from a node doesn’t rotate when the node is rotated, and noticed the same in the draggable link demo… Is there any way I can rotate this box?


You could try overriding LinkingTool and RelinkingTool.CopyPortProperties and SetNoTargetPortProperties to call the base method and then set the RotationAngle (and RotationSpot?) of the temporary node.

Thanks, setting the rotation angle seems to have done the trick.

I’ve also noticed my links behaving strangle when rotating nodes… Everything works as expected when the nodes rotation angle is 0, but at 90 the end segment runs along the node instead out (the direction is set to be RotatedNodeOrthogonal). At 180 the link draws across the node, and at 270 the link draws parallel to the node again. What do I need to do to have the link behave normally at all rotations?

That seems to be a problem only when connecting to a port with NoSpot. I think it works fine when connecting to the side ports that have a particular spot directionality. Do you agree?

Right now you have to change Link.Route.FromEndSegmentDirection and ToEndSegmentDirection. But we ought to be smarter about that. We’ll investigate.

OK, we’ll change the behavior in version 1.3 so that when the spot is Spot.None, Route.GetLinkDirection will ignore the [From/To]EndSegmentDirection and just return the absolute angle.

You might be able to override that method if you want to produce that change right now.

FYI - I fixed this by setting the EndSegmentDirections to Absolute for links that are to NoSpot (where PortID == null).

Thanks again