Hi,
I want to give the user the ability to re-anchor an existing link to another node of even another anchor on the same node (the idea being that the user could re-assign only one end of the link).
I've already written a lot of code to make sure links don't jump from AnchorPoint to AnchorPoint (which it did a lot) by assigning the links to custom ConnectionPoints instead of your anchors.
Since pretty much everything I've done up to now has not been supported by the library (no harm intended, I just got some weirds uses for a library that wasn't thought out for what I need), I decided to do the anchoring manually. I've drawn new handles on my links (at either end if them), hid the regular handles, then changed the behavior so that clicking and moving from any of the two handles would disconnect the link and enable you to connect it to another.
Here's the trouble, now; To make things simpler, I thought of using the Connection information of the old link, passing it to the new one I've instanciated in the behavior (first by using CreateLink(), then by creating links using the multiple given constructors) then removing the old link.
After 6 hours of trying every conceivable (and not internal) trick in or out the book, I cannot make the remaining end of the link stick to the ConnectionPoint the old one was attached to. The problem seems to be that when I return the InteractionState with a Create action, it systematically ignores any Origin/Destination information I put in the Link.
What's wrong is; in DiagramLink.StartCreate(), you automatically set your own origin/ConnectionPoint and all this, without any way for me to input my own data in there. Everything, from GetAnchor() to the StartCreate() method itself is internal. Even the UpdateFromPoint in the ConnectionPoint is internal.
As of now, the ONLY way I have of doing this is by moving the mouse over the connection point, then return to the original location once StartCreate() has been called. I obviously don't want to do this
Is there ANY WAY for me to prevent it from reassigning its own origin?
Thanks in advance,
Benoit Devost