|
|
Re: Moving bend points with source and target [message #1403156 is a reply to message #1403103] |
Mon, 21 July 2014 20:09 |
|
I have the impression you might be missing some coordinate system translations (the movement of source and target has to be translated into the coordinate system, in which the bendpoint locations are interpreted) and using the scale seems to be a hack which only compensates this partially. Have you checked what happens when you scroll?
|
|
|
|
Re: Moving bend points with source and target [message #1403263 is a reply to message #1403196] |
Tue, 22 July 2014 16:33 |
|
Again, you will have to make sure all coordinates are interpreted in the same coordinate system (i.e. here in the one used by the connection). Its the same problem as with source and target (which you have up to now solved only with a dirty workaround, which will not cover all cases). Source and target nodes are located somewhere in the primary layer (probably within a parent that adds a local coordinate system), connections are located in the connection layer, the endpoint positions you use for creation are probably absolute (i.e. not affected by the scroll offset).
What you will have to do is to translate them all to be relative to the same coordinate system to be comparable. You can either use the absolute one for this, or the relative one of the connection (i.e. that of the connection layer). IFigure#translateToParent(), IFigure#translateFromParent(), IFigure#translateToAbsolute(), and IFigure#translateToRelative() are meant to accomplish this.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03984 seconds