Adding adornment to a link


#21

Orthogonal links have the property that adjacent points in the route share the x value or the y value or both.


#22

There is another issue with this,
com-video-to-gif%20(2)

As you can see, When there is a single point in the link , I am able to move just the point outside.
Why does this behavior occur?


#23

I guess the LinkReshapingTool doesn’t try to limit how far a reshaping can go. I suppose you could override http://goxam.com/2.2/helpWPF/webframe.html#Northwoods.GoWPF~Northwoods.GoXam.Tool.LinkReshapingTool~DoReshape.html to limit how far the user can drag that reshape handle.


#24

The DoReshape method has been overridden from the code you suggested. Is there any property to set the limit of the drag?


#25

There is no property for that limitation. You will need to change the code to implement that.


#26

As you can see in the below gif,

com-video-to-gif%20(7)
I am fine with the point moving outside, but when I checked the issue further I found that when the two lines meet, that part of the link disappears(is invisible). Could you tell me how I can make the link visible when one overlaps over the other?


#27

That is a different issue. The implementation of Route.MakeGeometry skips points that are all in a line. I suspect you do not want to change that behavior, whereas it is relatively easy to limit where LinkReshapingTool.DoReshape allows the drag to go.


#28

The above issue occurs only when the above suggested LinkReshapingTool code is implemented. Without that the line seems to not disappear. Do you think any part of the suggested code triggers that behavior?


#29

I just tried this situation, dragging a link reshape handle way off to the right of the node on the right, in the Draggable Link sample, which does not have the custom LinkReshapingTool that we have been talking about in this topic.

The behavior is the same as what you just described – the geometry of the link does not extend beyond the port, so there is a big empty area between the reshape handle and the visible stroke of the link path.

So I still think that if you want to avoid that visible gap between the reshape handle and the geometry when the points of the link route are co-linear, then it would be easiest to limit how far the reshape handle can be dragged by the LinkReshapingTool.


#30

The user might drag it to any extent they want to.Hence I do not want to limit the drag. Is there no other way to solve this issue?


#31

I suppose you could reimplement Route.MakeGeometry. But that would be difficult, because there are so many cases that it handles normally.


#32

The below gif is what I was talking about. When I do not include the code from above , the behavior seems to be fine.

com-video-to-gif%20(8)

I think the LinkReshapingTool code triggers this behavior. What do you think?


#33

That could well be the problem. You have the complete code in that sample CustomLinkReshapingTool class that I wrote for you above, so if it does not operate the way that you expected, you can change it.