You are not asking for the mouse position to receive any anchor, you always return the same?
I wrote an editor for a grammar, where its necessary where the connection ends/starts, so I wrote an extra popup for it.
In your case you can ask for the relative coordinates of the anchor and compare it with the mouse position? Maybe that helps.
I think you misunderstood the question. That method is created by Spray, and it does return always the first anchor (that is wrong).
Now, if you have a shape with two anchors, how do you get the anchor near the mouse position?
I was thinking about drag&drop, but Spray has bugs even there.
Michael Wenz Messages: 1870 Registered: July 2009 Location: Walldorf, Germany
in plain Graphiti you would check the mouse location at the time the
connection is created and compare to the locations of the available anchors.
Then you would not use the anchor provided in the create connection context
(usually the chopbox anchor or the first anchor of the shape) but the one
But I don't know if and how that procedure is applicable to Spray.