mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Enhance aspect ratio tools | Rectangle, Diamond, Ellipses (#2439)
Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
4c90ea5667
commit
aa221837fc
11 changed files with 488 additions and 9492 deletions
11
src/keys.ts
11
src/keys.ts
|
@ -26,6 +26,7 @@ export const KEYS = {
|
|||
ARROW_RIGHT: "ArrowRight",
|
||||
ARROW_UP: "ArrowUp",
|
||||
BACKSPACE: "Backspace",
|
||||
ALT: "Alt",
|
||||
CTRL_OR_CMD: isDarwin ? "metaKey" : "ctrlKey",
|
||||
DELETE: "Delete",
|
||||
ENTER: "Enter",
|
||||
|
@ -59,8 +60,10 @@ export const isArrowKey = (key: string) =>
|
|||
export const getResizeCenterPointKey = (event: MouseEvent | KeyboardEvent) =>
|
||||
event.altKey;
|
||||
|
||||
export const getResizeWithSidesSameLengthKey = (event: MouseEvent) =>
|
||||
event.shiftKey;
|
||||
export const getResizeWithSidesSameLengthKey = (
|
||||
event: MouseEvent | KeyboardEvent,
|
||||
) => event.shiftKey;
|
||||
|
||||
export const getRotateWithDiscreteAngleKey = (event: MouseEvent) =>
|
||||
event.shiftKey;
|
||||
export const getRotateWithDiscreteAngleKey = (
|
||||
event: MouseEvent | KeyboardEvent,
|
||||
) => event.shiftKey;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue