weasel API - v0.8.0
    Preparing search index...

    Interface InsertDep

    Adapter dep for insertAction.

    Provided by <SceneCanvas> / <StandardActionsRegistrar>. The extras carry the active tool's kind + per-kind geometry. Callers that need typed data must supply a richer insert dep.

    interface InsertDep {
        commit(
            bounds: { height: number; width: number; x: number; y: number },
            extras: InsertExtras,
        ): NodeId | null;
    }
    Index

    Methods

    Methods

    • Materialise a new node from the given drag-rect bounds and typed per-kind extras. Returns the new node's id, or null if the consumer rejected the insert (e.g. sub-threshold bounds, unknown kind).

      Parameters

      • bounds: { height: number; width: number; x: number; y: number }
      • extras: InsertExtras

      Returns NodeId | null