Files
Mark Tolmacs 5ed8ceb310 fix(editor): lock the arrow angle as soon as Shift is pressed
Pressing Shift while drawing an arrow, placing one by clicking or
dragging one of its points did not lock the angle until the pointer
moved. For example, with an arrow starting at (100, 100) and the pointer
resting at (300, 120), the tip stayed 20 px off horizontal after Shift
was pressed. The next pointer move at the same coordinates then snapped
it horizontal. Releasing Shift while Ctrl was held left the angle locked
in the same way.

Shift is only read when the point is recomputed, and no Shift key event
recomputed it. The Alt and Ctrl key handlers re-run the point through
`maybeHandleArrowPointlikeDrag`. Shift was only covered by accident: the
Ctrl keydown branch runs for any key pressed while Ctrl is held, and the
keyup branch runs for any key released without Ctrl.

Pressing Shift (ignoring auto-repeat) and releasing it now also call
`maybeHandleArrowPointlikeDrag`, which already handles all three cases.
Adds `KEYS.SHIFT`.
2026-11-26 14:42:45 +00:00
..

@excalidraw/common

Install

npm install @excalidraw/common

If you prefer Yarn over npm, use this command to install the Excalidraw utils package:

yarn add @excalidraw/common

With PNPM, similarly install the package with this command:

pnpm add @excalidraw/common