carlw
01/06/2017, 3:59 PMpermalmberg
01/06/2017, 4:18 PMstackpane
seems to get different coordinate systems because now my lines no longer aligns to the squares.permalmberg
01/06/2017, 4:19 PMRuckus
01/06/2017, 5:01 PMNode.viewOrder
property. For now, render order is determined by when it's added to the scene graph.Ruckus
01/06/2017, 5:01 PMedvin
01/06/2017, 5:04 PMedvin
01/06/2017, 5:06 PMcarlw
01/06/2017, 5:07 PMcarlw
01/06/2017, 5:07 PMcarlw
01/06/2017, 5:08 PMedvin
01/06/2017, 5:08 PMcarlw
01/06/2017, 5:10 PMedvin
01/06/2017, 5:11 PMedvin
01/06/2017, 5:12 PMedvin
01/06/2017, 5:30 PMRuckus
01/06/2017, 5:32 PMgtnarg
01/06/2017, 5:32 PMpermalmberg
01/06/2017, 6:16 PMoverride val root = scrollpane {
stackpane {
group {
rectangle {
}
}
group {
}
}
}
Specifically the second group
- just by adding it the coordinate system of the first group
is corrupted (item placed at 10,10 ends up at 0,0)
Let me answer that myself: It is not. The problem lies elsewherepermalmberg
01/06/2017, 6:38 PMoverride val root = scrollpane {
stackpane {
group {
rectangle {
layoutX = 0.0
layoutY = 0.0
width = 5000.0
height = 5000.0
fill = Color.LIGHTGOLDENRODYELLOW
}.apply {
drawingBackground = this
}
}.apply {
componentLayer = this
}
group {
}.apply {
wireLayer = this
}
}
}
When converting scene coordinates to local coordinates using parent.sceneToLocal
where parent is the group
referred to as componentLayer
I get Point2D [x = 23.0, y = 15.0]
, but if I insted make parent to be the group
named wireLayer
I instead get Point2D [x = -2478.0, y = -2486.0]
. Shouldn't both groups convert the coordinates to the same value?permalmberg
01/06/2017, 6:45 PMgroup
doesn't have a rectangle taking up space, the coordinate system is calculated differently. I don't quite understand it, but by changing the second group
to this, it works as expected.
group {
rectangle {
layoutX = 0.0
layoutY = 0.0
width = 5000.0
height = 5000.0
fill = Color.TRANSPARENT
}.apply {
drawingBackground2 = this
}
}.apply {
wireLayer = this
}
edvin
01/06/2017, 6:45 PMpermalmberg
01/06/2017, 6:46 PMpermalmberg
01/06/2017, 6:48 PMedvin
01/06/2017, 6:48 PMpermalmberg
01/06/2017, 6:50 PMpermalmberg
01/06/2017, 7:02 PMstyle(append = true)
with the addClass
function?permalmberg
01/06/2017, 7:18 PMLook, lines are on a layer beneath the component! :)▾
carlw
01/06/2017, 7:23 PMcarlw
01/06/2017, 8:16 PMcarlw
01/06/2017, 8:16 PM