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

    Interface CloneBehavior

    A behavior plugged into useClone; gates on modifier state and emits ops at gesture end.

    interface CloneBehavior {
        activates: (modifiers: ModifierState) => boolean;
        defaultTransient?: boolean;
        id: string;
        onEnd: (
            pose: ClonePose,
            ctx: { adapter: InsertAdapter<{ id: string }> },
        ) => Op[];
    }
    Index

    Properties

    activates: (modifiers: ModifierState) => boolean

    Decides whether this gesture should activate at start.

    defaultTransient?: boolean

    Default true.

    id: string
    onEnd: (
        pose: ClonePose,
        ctx: { adapter: InsertAdapter<{ id: string }> },
    ) => Op[]

    On end, returns ops to commit (or [] for no-op).