mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: Change object Point type to GenericPoint
Replaced instances of object literal Point types with the `GenericPoint` type.
This commit is contained in:
parent
f881b202da
commit
b2d6d9d7ff
1 changed files with 3 additions and 4 deletions
|
@ -6213,13 +6213,12 @@ class App extends React.Component<AppProps, AppState> {
|
||||||
|
|
||||||
private handleEraser = <Point extends GenericPoint>(
|
private handleEraser = <Point extends GenericPoint>(
|
||||||
event: PointerEvent,
|
event: PointerEvent,
|
||||||
pointerDownState: PointerDownState,
|
|
||||||
scenePointer: Point,
|
scenePointer: Point,
|
||||||
scenePointer: { x: number; y: number },
|
|
||||||
) => {
|
) => {
|
||||||
|
const [scenePointerX, scenePointerY] = scenePointer;
|
||||||
const elementsToErase = this.eraserTrail.addPointToPath(
|
const elementsToErase = this.eraserTrail.addPointToPath(
|
||||||
scenePointer.x,
|
scenePointerX,
|
||||||
scenePointer.y,
|
scenePointerY,
|
||||||
event.altKey,
|
event.altKey,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue