The goal here is just to be able to expand/collapse groups and have them remain in the same position.
Based on our other thread, I’m guessing the issue here could be that we start our groups collapsed. We set a padding of 10 on the Placeholder. Before the group is ever expanded, that padding doesn’t seem to be taken into account, but every time after it is. If I set the padding to 0, this issue goes away.
I think it may also only happen when the group being expanded has another group inside of it? Does that make any sense? It appears when the group being expanded has only non-group nodes inside, this doesn’t happen.
Here’s a description to the behavior we’re seeing:
- start a group collapsed
- expand the group, the top-left corner of the group moves up-left a few pixels, and the group is now in a new position.
- collapse the group, the top-left corner stays stationary
- expand the group again, the top-left corner moves, but then immediately animates back to its previous position. (To be clear, this jump is not a problem, because its final position is consistent.)
Is there something we can do to initialize the Placeholders to prevent this? Or, if we can detect the placeholder is “unready” (not sure how), we could set a locationSpot of (0, 0, 20, 20) and that seems to correct for it.