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

    Interface SelectionOutlineLayerOpts<TPose>

    Options for createSelectionOutlineLayer.

    interface SelectionOutlineLayerOpts<TPose> {
        getBounds?: (pose: TPose) => Bounds;
        getChildren?: (id: string) => readonly string[];
        getPose: (id: string) => TPose | null;
        getSelection: () => readonly NodeId[];
        isContainer?: (id: string) => boolean;
        outline?: Stroke & { pad?: number };
    }

    Type Parameters

    • TPose

    Hierarchy

    • SelectionLayerCommon<TPose>
      • SelectionOutlineLayerOpts
    Index

    Properties

    getBounds?: (pose: TPose) => Bounds

    Project a pose into its AABB. Defaults to the identity — rect-shaped poses ({x, y, width, height}) need no override. For Path poses pass boundsOfPath.

    getChildren?: (id: string) => readonly string[]

    Walk a container's direct children (e.g. scene.childrenOf). When supplied with isContainer, any id that resolves to a container is rendered using the union bounds of all its transitive leaves.

    getPose: (id: string) => TPose | null

    Return null to skip rendering for an id (e.g. resolved pose unavailable). Takes string rather than NodeId because the container-aware bounds resolver internally walks expanded leaf ids via getChildren, which is generic over arbitrary string ids. NodeIds flow in fine — a NodeId is a string.

    getSelection: () => readonly NodeId[]
    isContainer?: (id: string) => boolean

    True when id is a structural container.

    outline?: Stroke & { pad?: number }

    Outline stroke style + outset distance from the pose rect.