Fix Select tool's scale nudging with multi-layer selection (#1699)

* Fix scale nudging for multiple selection

* Use message discriminant for filtering where possible

* Remove unnecessary parameter from `selected_bounds_document_space`

* Fix the error `target.closest is not a function`

* Minor cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Elbert Ronnie
2024-03-26 01:50:30 +05:30
committed by GitHub
parent 0a9bd41be1
commit e9510c5fee
6 changed files with 41 additions and 29 deletions

View File

@@ -286,7 +286,7 @@
// Assumes the spawner is a sibling of this FloatingMenu component
const ownSpawner: HTMLElement | undefined = self?.parentElement?.querySelector(":scope > [data-floating-menu-spawner]") || undefined;
// Get the spawner element containing whatever element the user is hovering over now, if there is one
const targetSpawner: HTMLElement | undefined = target?.closest("[data-floating-menu-spawner]") || undefined;
const targetSpawner: HTMLElement | undefined = target?.closest?.("[data-floating-menu-spawner]") || undefined;
// HOVER TRANSFER
// Transfer from this open floating menu to a sibling floating menu if the pointer hovers to a valid neighboring floating menu spawner