You have a row of frames on the canvas.
Now, you want to:
- Add a new frame in between
- Duplicate a frame
- Add a note next to a screen
You have to manually move everything on the right. Not so exciting isn't?
Make way! just moves them for you with zero effort!
- Select any item (not just frames, any type of node)
- Launch plugin
- Move everything on the right to create that space
This process creates space next to a selected item (S) by simulating a horizontal "ripple" effect that pushes adjacent items, and then conditionally grows the parent containers up the hierarchy. A parent container only grows if the ripple reaches its absolute boundary.
VID_20251211211557.mp4
The goal is to define the space that needs to be created and initiate the movement.
- Define space: Determine the total SPACE_TO_CREATE.
- Create catalyst Z: A temporary, invisible placeholder item (Z) is created immediately to the right of S with the width of SPACE_TO_CREATE.
- Start ripple: The initial movement is triggered using Z as the starting point.
This non-recursive sweep calculates item movement and returns the reach of the ripple.
- Identify ripple front: The initial Ripple Front is the absolute right edge of the StartNode (e.g., the catalyst Z).
- Find & sort targets: Find all movable siblings that are positioned to the right and vertically overlap the StartNode. Strictly sort these targets from left-to-right.
- Iterate & push: Sweep through the sorted items:
- IF a target item's left edge is touching or overlapping the current Ripple Front:
- Move that item to the right by the ShiftAmount.
- Update the Ripple Front to the item's new absolute right edge to continue the push to the next item.
- ELSE (no overlap):
- STOP the sweep immediately.
- IF a target item's left edge is touching or overlapping the current Ripple Front:
- Result: Return the final absolute X-coordinate of the Ripple Front.
This process handles cascading container growth, applying the containment check at every level, including the initial local parent.
- Run initial ripple: Execute PropagateShift on the catalyst Z within its immediate parent (P). Get the finalRippleFrontierX.
- Get parent boundary: Calculate the absolute right boundary of P (before any resize).
- Containment check:
- IF
finalRippleFrontierXis less than the Parent Boundary:- The ripple was contained. DO NOT resize P.
- Skip Step 3.2 (PropagateResize) entirely.
- ELSE (ripple reached boundary):
- Resize P: Increase the width of P by SPACE_TO_CREATE.
- Continue Upward: Call PropagateResize with P as the starting node.
- IF
This process continues recursively up the hierarchy, checking for containment at each parent level.
- Identify X & P: X is the ResizedNode. P is the parent of X.
- Base case:
- IF P is the Page or Document node: Run the final PropagateShift on P's children, and STOP the recursion.
- Parent boundary: Calculate the absolute right boundary of P.
- Lateral collision check & get ripple front: Call PropagateShift(X, P, SpaceCreatedInResize) to move siblings of X and get the finalRippleFrontierX.
- Containment decision:
- IF
finalRippleFrontierXis less than the Parent Boundary:- The ripple was contained. DO NOT resize P.
- STOP the recursion immediately.
- ELSE (ripple reached boundary):
- Resize P: Increase the width of P by SpaceCreatedInResize.
- Recursive call: Recursively call PropagateResize with P.
- IF
- Delete Z: The temporary placeholder item Z is deleted.