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

    Interface CommonAffordanceScratch

    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 CommonAffordanceScratch {
        anchor?: { x: "min" | "max" | "free"; y: "min" | "max" | "free" };
        fixedPoint?: { x: number; y: number };
        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.

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

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

    targetId?: string

    The node (or MULTI_RESIZE_TARGET_ID) this chrome acts on. Becomes AffordanceHit.targetIds.