Refactoring in pointer down event handler (#1880)

* Refactor: Move context menu touch device handling

* Refactor: Move more stuff out of pointer down

* Refactor: Move last coords into an object

* Refactor: Move scrollbar handling out of pointer down

* Refactor: simplify resizing in pointer down

* Refactor: further simplify resizing in pointer down

* Refactor: clarify clearing selection code

* Refactor: move out clearing selection from pointer down

* Refactor: further simplify deselection in pointer down
This commit is contained in:
Michal Srb 2020-07-08 22:07:51 -07:00 committed by GitHub
parent d5e7d08586
commit 5d7020cce6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 278 additions and 226 deletions

View file

@ -81,7 +81,7 @@ export const getElementWithResizeHandler = (
pointerType,
);
return resizeHandle ? { element, resizeHandle } : null;
}, null as { element: NonDeletedExcalidrawElement; resizeHandle: ReturnType<typeof resizeTest> } | null);
}, null as { element: NonDeletedExcalidrawElement; resizeHandle: HandlerRectanglesRet } | null);
};
export const getResizeHandlerFromCoords = (