Nodes can be moved without their rect being updated #3
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: profectus/Profectus#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
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.
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.