-
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.
Less dom queries in grid strategies (#6377)
Followup to #6373 I continued the work to - remove dom api queries from strategies - migrate from window points and rectangle to canvas ones. - unify the cell query functions, because we have more than 5 functions which basically do the same thing (return cell data under the a point) **Fix:** - Replaced all `TargetGridCellData` usage with the new `TargetGridCellDataCanvas`, which contains canvas and not window bounds (and renamed that back to `TargetGridCellData`) - Deleted a bunch of similar query functions which returned cell data under a certain point (`getTargetCell`, `getGridCellUnderMouse`, `getGridCellUnderMouseRecursive`, `getTargetGridCellUnderCursor`, etc), and replaced them all with `getGridCellUnderMouseFromMetadata ` - Updated grid-resize-element, grid-rearrange-move, grid-rearrange-move-duplicate, grid-draw-to-insert to use `getGridCellUnderMouseFromMetadata` - I had some 1-pixel differences in draw-to-insert tests... not sure why, maybe a rounding error in the canvas<->window conversions which I removed. I updated the tests, I think draw to insert works fine. **Next step:** - [ ] Continue deleting/converting grid query functions to metadata: `getGridCellBoundsFromCanvas`, `getGridCellAtPoint`, `getCellWindowRect` **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Preview mode
- Loading branch information
Showing
9 changed files
with
59 additions
and
143 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
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.