mirror of
https://github.com/excalidraw/excalidraw.git
synced 2026-11-21 05:24:15 +03:00
Arrow labels can be dragged along their arrow. A label's place is stored on the text element as labelPosition, a normalized arc-length parameter (0–1) over the arrow's whole path, and the label's x/y is derived from it. Because the parameter covers the whole path rather than one segment, the label keeps its place when points are dragged, when midpoints are inserted or removed, and when the arrow is resized. (An earlier iteration anchored labels to a segment; that approach is gone.) Closes #9338. --------- Signed-off-by: Mark Tolmacs <mark@lazycat.hu> Co-authored-by: Mark Tolmacs <mark@lazycat.hu> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
@excalidraw/math
Install
npm install @excalidraw/math
If you prefer Yarn over npm, use this command to install the Excalidraw utils package:
yarn add @excalidraw/math
With PNPM, similarly install the package with this command:
pnpm add @excalidraw/math