I want to have a component positioned so that it is at the top of the view port. Similar to position: absolute; top: 0; in CSS. My issue is that it seems that my component is “trapped” within its parent. I’ve tried setting y to 0, and to various negative numbers. It never appears any higher on screen than its parent.
So it sounds like you’re saying the position of a component is always relative to its parent. Is there no way to say “put this at the top of the screen, regardless of where the parent is”?
I’m currently doing what you suggest: setting y to a negative value. Specifically, I’m setting it to -parentY. This gets me partway there, but it’s not quite right.
Is there an api for finding the y of the parent? Currently I’m doing this rather ugly thing: const parentY = -this.__core._parent._renderContext.py.