Nested node position offset #1721
-
not nested node |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Your post is lacking a proper description again but I think I can assume what you're asking is why the position seems to behave differently than you expect. |
Beta Was this translation helpful? Give feedback.
Your post is lacking a proper description again but I think I can assume what you're asking is why the position seems to behave differently than you expect.
This is due to to the behavior of
position
when aparentNode
is used.A node with a parentNode id will have it's position relative to the parent node. That means
position: { x: 0, y: 0 }
would be the top-left corner of the parent node, while a node without a parent node will position itself relative to the viewport, meaningposition: { x: 0, y: 0 }
would be the top-left corner of the viewport (given it has not been moved whatsoever).