Mark Tolmacs f75948fe3e fix(editor): don't skip elbow arrow updates that carry points
The no-op short circuit in updateElbowArrowPoints() returned `{}` whenever
the bindings were passed unchanged and `updates.points` matched the
arrow's first points. A two-point update was compared against the
arrow's start and its *first corner*, not its end. It also ignored
whether the bound elements had moved. As a result:

- moving the end onto the arrow's first corner was dropped
- the same endpoints after a bound element moved were dropped (stale
  route)
- a fixed segment move with the bindings passed along was dropped

The short circuit now only applies to updates that set the same
bindings again and nothing else. That is the case it was added for
(#9067), and the only one in-app callers reach. Updates with points or
fixed segments always go through routing.

Not reachable from the editor's own interactions. Only host apps
passing bindings explicitly through mutateElement or
updateElbowArrowPoints hit it.

# Tests
make toCloselyEqualPoints actually compare closely

The default tolerance was 10^precision (100px) instead of 10^-precision,
and extra received points were ignored. Use 10^-precision (0.01 by
default; `precision = 0` keeps its tolerance of 1) and require the
point counts to match.

This exposes five elbow arrow tests whose expectations went stale with
the binding gap reduction in #10739 (gap 11px -> 6px with the default
stroke). Update them, and assert the moved segment's scene position in
the segment move test so it no longer depends on the gap.

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
2026-11-19 16:09:09 +00:00
2024-08-06 13:21:20 +02:00
2020-04-03 19:19:01 +02:00
2024-09-09 17:12:07 +02:00
2020-09-15 21:59:00 +02:00
2025-05-25 21:23:40 +02:00
2023-05-18 16:06:27 +02:00
2025-05-25 21:23:40 +02:00
2020-01-05 13:09:29 -08:00

Excalidraw

Excalidraw Editor | Blog | Documentation | Excalidraw+

An open source virtual hand-drawn style whiteboard.
Collaborative and end-to-end encrypted.


Excalidraw is released under the MIT license. npm downloads/month PRs welcome! Chat on Discord Ask DeepWiki Follow Excalidraw on Twitter

Product showcase

Create beautiful hand-drawn like diagrams, wireframes, or whatever you like.

Features

The Excalidraw editor (npm package) supports:

  • 💯 Free & open-source.
  • 🎨 Infinite, canvas-based whiteboard.
  • ✍️ Hand-drawn like style.
  • 🌓 Dark mode.
  • 🏗️ Customizable.
  • 📷 Image support.
  • 😀 Shape libraries support.
  • 🌐 Localization (i18n) support.
  • 🖼️ Export to PNG, SVG & clipboard.
  • 💾 Open format - export drawings as an .excalidraw json file.
  • ⚒️ Wide range of tools - rectangle, circle, diamond, arrow, line, free-draw, eraser...
  • ➡️ Arrow-binding & labeled arrows.
  • 🔙 Undo / Redo.
  • 🔍 Zoom and panning support.

Excalidraw.com

The app hosted at excalidraw.com is a minimal showcase of what you can build with Excalidraw. Its source code is part of this repository as well, and the app features:

  • 📡 PWA support (works offline).
  • 🤼 Real-time collaboration.
  • 🔒 End-to-end encryption.
  • 💾 Local-first support (autosaves to the browser).
  • 🔗 Shareable links (export to a readonly link you can share with others).

We'll be adding these features as drop-in plugins for the npm package in the future.

Quick start

Note: following instructions are for installing the Excalidraw npm package when integrating Excalidraw into your own app. To run the repository locally for development, please refer to our Development Guide.

Use npm or yarn to install the package.

npm install react react-dom @excalidraw/excalidraw
# or
yarn add react react-dom @excalidraw/excalidraw

Check out our documentation for more details!

Contributing

Integrations

Who's integrating Excalidraw

Google Cloud • Meta • CodeSandbox • Obsidian Excalidraw • Replit • Slite • Notion • HackerRank • and many others

Sponsors & support

If you like the project, you can become a sponsor at Open Collective or use Excalidraw+.

Thank you for supporting Excalidraw

Last but not least, we're thankful to these companies for offering their services for free:

Vercel Sentry Crowdin

Languages
TypeScript 94.1%
SCSS 2.5%
JavaScript 1.6%
MDX 1.4%
HTML 0.4%