SDK JS
    Preparing search index...
    DrawAction:
        | { mode: DrawState["mode"]; type: "start" }
        | { type: "addVertex"; vertex: DrawVertex }
        | { index: number; type: "updateVertex"; vertex: DrawVertex }
        | { type: "undoVertex" }
        | { type: "setHover"; vertex: DrawVertex | null }
        | { dedupeEcho?: boolean; type: "finish" }
        | { type: "cancel" }
        | { type: "clear" }

    Actions accepted by reduceDraw.

    Type Declaration

    • { mode: DrawState["mode"]; type: "start" }
    • { type: "addVertex"; vertex: DrawVertex }
    • { index: number; type: "updateVertex"; vertex: DrawVertex }
    • { type: "undoVertex" }
    • { type: "setHover"; vertex: DrawVertex | null }
    • { dedupeEcho?: boolean; type: "finish" }

      dedupeEcho — drop a duplicate terminal vertex first (a dblclick-to-finish fires click+click, so ONLY the dblclick path passes true; Enter / auto-finish must not, or a deliberate re-click of the same spot — e.g. a facade base+top at one lng/lat — is eaten).

    • { type: "cancel" }
    • { type: "clear" }