Field Notes
    Preparing search index...

    Multi-waypoint movement measuring: tap to anchor, drag or click to add corners, tap on or near the last waypoint (or press Enter) to finish, Escape or a pointer takeover to abandon.

    Store-free by contract: the tool never creates, moves, or deletes elements and never opens a history transaction — it only measures. A completed path is handed to onCommit listeners and the HOST applies the move (inside its own transaction) if it wants one. Path snapshots are ephemeral in the same sense as MeasureTool's: presence only — never elements, history, or persisted state.

    Implements

    Index
    name: "path" = 'path'
    • Subscribes to finished paths. The emission carries cursor: null and the final waypoints; applying the move (and recording history for it) is the host's job — the tool has already forgotten the path by then.

      Parameters

      Returns () => void

    • Offered every keydown that reaches the canvas (never from editable targets, and only within the viewport's keyboard scope) BEFORE the shortcut map. Return true to consume it (default prevented, no shortcut runs). Listeners are owned by the viewport, so a tool holds no DOM subscriptions and deactivation cannot leak.

      Parameters

      Returns boolean

    • Subscribes to raf-coalesced path snapshots. While a path is open, listeners receive at most one snapshot per animation frame carrying the latest state; null is delivered synchronously when the path closes (commit, cancel, or deactivate).

      Parameters

      Returns () => void