On another topic: I'm strugling with local- vs sce...
# tornadofx
p
On another topic: I'm strugling with local- vs scene-relative coordinates. I have a simple class inheriting from `javafx.scene.shape.Line`:
class WireView(source: OutputView, target: InputView) : Line()
I want to bind the `startX/Y `and
endX/Y
properties to another view so that the ends of the line moves when the other view. As such, in the other view (a
Fragment
) I do:
Copy code
override fun bindPosition(wire: WireView) {
        wire.endXProperty().bind( root.layoutXProperty())
        wire.endYProperty().bind( root.layoutYProperty())
    }
The binding in it self seems to work, but the problem is that
root.layoutX
is local to that
Fragment
. Is there an easy way to transform the local coordinate system to that of the view that the
Fragment
is contained by? As I type this, I remember reading about using a converter for bindings, perhaps that is the way?