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

    Interface GestureSource

    Everything <Canvas> needs to know about in-flight gestures that it can't see for itself.

    <Canvas> is deliberately dispatcher-agnostic — it owns the union math and the CanvasHelpers contract, but the live gesture state lives in the gesture dispatcher that <SceneCanvas> creates. This is the one seam between them (createGestureSource in SceneCanvas/dispatcherGestureBounds.ts builds it); bare <Canvas> consumers leave it unwired and get the "no gesture in flight" answers.

    interface GestureSource {
        bounds(): Iterable<Bounds, any, any> | null;
        getVersion(): number;
        ids(): Iterable<string, any, any> | null;
        subscribe(fn: () => void): () => void;
    }
    Index

    Methods

    • Ids the in-flight gesture is previewing, so the canvas can resolve each one's preview bounds.

      Wider than previewIdsExtra, which honors previewHidesSource: false because its job is deciding whose committed paint to suppress: a clone ghost hides nothing yet still proposes content at the drag target.

      Returns Iterable<string, any, any> | null

    • Fires whenever the above can have changed. See CanvasHelpers.subscribeGestures for the published guarantee.

      Parameters

      • fn: () => void

      Returns () => void