Nodes can be moved without their rect being updated #3

Open
opened 2022-03-28 00:20:06 +00:00 by thepaperpilot · 1 comment
thepaperpilot commented 2022-03-28 00:20:06 +00:00 (Migrated from github.com)

If a node is moved due to another element appearing, disappearing, or changing size, the rect won't get updated. For example, the particle effect here does not move when the node gets pushed down by showing a new milestone:
image
image

I've tried various ways of figuring out when a element has moved, and none have worked for this use case.

Also, an ideal solution would only track when the position changes relative to the Context container.

If a node is moved due to another element appearing, disappearing, or changing size, the rect won't get updated. For example, the particle effect here does not move when the node gets pushed down by showing a new milestone: ![image](https://user-images.githubusercontent.com/3683148/160307631-c338dac7-4ee1-4e82-8c42-db19e44c1d41.png) ![image](https://user-images.githubusercontent.com/3683148/160307627-527ed92d-7df8-43e9-9dba-6a25d0bac450.png) I've tried various ways of figuring out when a element has moved, and none have worked for this use case. Also, an ideal solution would only track when the position changes _relative to the Context container_.
thepaperpilot commented 2022-03-28 00:22:11 +00:00 (Migrated from github.com)

While implementing a fix for this, it might also be appropriate to find a way to not calculate the bounding rect until it's value is needed. Perhaps mock a ref, so that it can be marked dirty - activating any watchers, or lazy evaluating whenever a dependency requests it. This would help the issue of calculating many rects for elements whose positions/sizes aren't actually used by anything.

While implementing a fix for this, it might also be appropriate to find a way to not calculate the bounding rect until it's value is needed. Perhaps mock a ref, so that it can be marked dirty - activating any watchers, or lazy evaluating whenever a dependency requests it. This would help the issue of calculating many rects for elements whose positions/sizes aren't actually used by anything.
thepaperpilot added this to the Profectus project 2023-11-16 16:50:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: profectus/Profectus#3
No description provided.