perf: make eraser great again (#9352)

* perf: make eraser great again

* lint

* refactor and improve perf

* lint
This commit is contained in:
Ryan Di
2025-04-15 16:58:45 +02:00
committed by GitHub
parent 6fe7de8020
commit 58f7d33d80
5 changed files with 259 additions and 120 deletions
+5 -3
View File
@@ -7,11 +7,13 @@ import {
polygonIncludesPointNonZero,
} from "@excalidraw/math";
import type { GlobalPoint, LineSegment } from "@excalidraw/math/types";
import type {
ElementsSegmentsMap,
GlobalPoint,
LineSegment,
} from "@excalidraw/math/types";
import type { ExcalidrawElement } from "@excalidraw/element/types";
export type ElementsSegmentsMap = Map<string, LineSegment<GlobalPoint>[]>;
export const getLassoSelectedElementIds = (input: {
lassoPath: GlobalPoint[];
elements: readonly ExcalidrawElement[];