New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TXT does not move with parent Line when tweening #1020
Comments
Your example works correctly, test2 would move together with its parent if you were to change the parent's position. If you want to position something at the center of the line you can use view.add(
<Line
// ...
>
<Txt
// ...
position={() => line2ref().getPointAtPercentage(0.5).position}
>
test2
</Txt>
</Line>
); |
Thank you. That would be nice if it was documented. I think I make a PR for the docs. Is there a reason why the origin schould not be moved? I think it would be convenient and the usage more intuitive and less verbose if the origin would be moved. |
There's currently no way to move the origin. Child nodes are always positioned relative to the parent's transform. |
I meant that it would be intuitive if Why should the origin not move if the points moved. I think moving the origin to |
Again, given the current implementation, there's no way to move the origin of the node used by the children without modifying the position of the node itself. And you cannot modify the position of the |
Describe the bug
When i have a child node I expect it to always move with the parent. This is the case for Txt in Circles etc. but seems to be a bug with Line as a parent.
To Reproduce
(https://stackblitz.com/edit/stackblitz-starters-xumqnr?file=my-animation%2Fsrc%2Fscenes%2Fexample.tsx)
"test2" is a child node of the second appearing line. It but does not inherit the position of the parent.
Expected behavior
When i have a child node I expect it to always move with the parent.
Package versions:
The text was updated successfully, but these errors were encountered: