-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better grid resize element strategy (#6457)
**Problem:** The original grid-resize-element strategy was written in a way, that it resized based on the data that which cell is currently under the mouse. This made it impossible to resize with the mouse e.g. going in between cells over the gap, or outside of the grid. **Fix:** Let's rely on the resize bounding box coming from `resizeBoundingBoxFromSide`, and we can resize to those cells which have an intersection with the resize bounding box. As an extra, I refactored the `getMetadataWithGridCellBounds` function, so that it returns the updated custom strategy state, and the strategies don't have to construct that (this strategy state update guarantees that if the grid cell bounds were only found in the latestmetadata, then we store them in the custom strategy state, so they are kept until the end of the interaction). For the note, some grid strategies add further changes to the strategy state, after the subsequent strategy refactors these will be removed. **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
6 changed files
with
201 additions
and
161 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
Oops, something went wrong.