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

    Interface ActionBehavior<TPose, TProposed, TMoveResult>

    Generalized base behavior. Each hook defines an alias that pins the proposed-pose shape (TProposed) and the onMove return shape (TMoveResult). onEnd is uniform: first non-undefined return wins (Op[] = commit those, null = abort, undefined = defer).

    defaultTransient: when at least one behavior in a gesture sets this true AND the hook's options.transient is not explicitly set, the gesture commits its ops via adapter.applyOps(ops) (no history entry). When options.transient is set explicitly, that value wins.

    interface ActionBehavior<TPose, TProposed, TMoveResult> {
        defaultTransient?: boolean;
        onEnd?(ctx: GestureContext<TPose>): void | Op[] | null;
        onMove?(
            ctx: GestureContext<TPose>,
            proposed: TProposed,
        ): void | TMoveResult;
        onStart?(ctx: GestureContext<TPose>): void;
    }

    Type Parameters

    • TPose
    • TProposed
    • TMoveResult
    Index

    Properties

    defaultTransient?: boolean

    Methods