-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grid reparent uses rearrange helper (#6505)
**Description:** Grid reparent uses the grid rearrange helper to set the grid specific properties. When you reparent into a grid container, moving the element to the target cell, setting the grid control properties to support animation, etc. is really similar to grid rearrange. Despite that, the two strategies did not share code. I modified the grid reparent strategy to call runGridRearrangeMove. This automatically added animation to grid reparent, and fixed some jumping around. **Commit Details:** (< vv pls delete this section if's not relevant) - `runGridRearrangeMove` has a new parameter for the grid metadata (before that it could assume that the grid is parent of the selected element, but during reparent this is not true) - some of the `runGridRearrangeMove` which handles multicell elements is not needed for grid reparent, I needed to handle that (e.g. during grid reparent we always put the element into a single target cell, so no need to handle the original size in cells, the offset between the dragged cell and root cell, etc) - Removed `getGridPositioningCommands` which is replaced by `runGridRearrangeMove` **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Play mode
- Loading branch information
Showing
4 changed files
with
106 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters