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

    Interface AnchorScratch

    The fields buildAffordanceAt lifts out of a region's initialScratch when it turns a region hit into an AffordanceHit.

    Scratch is otherwise opaque — whatever the affordance wants to hand the action that picks up the drag. These few names are the exception: they mean the same thing to every affordance, and the actions that consume them (resizeAction, rotateAction) read them off AffordanceHit rather than out of scratch. An affordance that doesn't set them simply produces a hit without those fields.

    interface AnchorScratch {
        anchor?: { x: "min" | "max" | "free"; y: "min" | "max" | "free" };
        anchorIndex: number;
        fixedPoint?: { x: number; y: number };
        part: "anchor" | "controlIn" | "controlOut";
        targetId: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    anchor?: { x: "min" | "max" | "free"; y: "min" | "max" | "free" }

    For resize chrome: which corner stays pinned. Mirrors the kit's ResizeAnchor, spelled inline so affordances/ doesn't take a type dependency on the gesture layer for one field.

    anchorIndex: number

    Sequential anchor index in path walk order.

    fixedPoint?: { x: number; y: number }

    World-space invariant point of the transform — the fixed corner for a resize, the pivot for a rotation.

    part: "anchor" | "controlIn" | "controlOut"

    Which of the anchor's three grabbable points this is.

    targetId: string

    Node id of the path the anchor belongs to.