mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix detecting rotated elements with selection (#1273)
* fix #1232 * Update src/element/bounds.ts * prefer arrow functions * fix merging Co-authored-by: Lipis <lipiridis@gmail.com>
This commit is contained in:
parent
98ea88262f
commit
c3b83fba38
3 changed files with 30 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
|||
import { ExcalidrawElement } from "../element/types";
|
||||
import { getElementAbsoluteCoords } from "../element";
|
||||
import { getElementAbsoluteCoords, getElementBounds } from "../element";
|
||||
import { AppState } from "../types";
|
||||
import { newElementWith } from "../element/mutateElement";
|
||||
|
||||
|
@ -14,12 +14,9 @@ export function getElementsWithinSelection(
|
|||
selectionY2,
|
||||
] = getElementAbsoluteCoords(selection);
|
||||
return elements.filter((element) => {
|
||||
const [
|
||||
elementX1,
|
||||
elementY1,
|
||||
elementX2,
|
||||
elementY2,
|
||||
] = getElementAbsoluteCoords(element);
|
||||
const [elementX1, elementY1, elementX2, elementY2] = getElementBounds(
|
||||
element,
|
||||
);
|
||||
|
||||
return (
|
||||
element.type !== "selection" &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue