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

    Interface MinimapCanvasProps<TData, TLayer, TPose>

    interface MinimapCanvasProps<TData, TLayer extends string, TPose> {
        canvasRef?: Ref<HTMLCanvasElement>;
        className?: string;
        drawOne: SceneViewDrawOne<TData, TLayer, TPose>;
        fit?: MinimapFit<TData, TLayer, TPose>;
        height: number;
        indicatorStyle?: IndicatorStyle;
        mainView: View;
        mainViewDims: { height: number; width: number };
        onMainViewChange: (next: View) => void;
        poseBounds?: (pose: TPose) => Bounds;
        scene: Scene<TData, TLayer, TPose>;
        width: number;
    }

    Type Parameters

    • TData
    • TLayer extends string
    • TPose
    Index

    Properties

    canvasRef?: Ref<HTMLCanvasElement>

    Forwarded ref to the underlying <canvas>.

    className?: string

    CSS class for sizing / positioning the canvas.

    Consumer's draw callback. Applied through the derived fit view; same signature as <SceneCanvas>'s scene-slot drawOne so the consumer can reuse it (typically simplified — just colored AABBs).

    Fit policy. Defaults to "scene" (AABB union of leaf poses). See MinimapFit for the full shape.

    height: number
    indicatorStyle?: IndicatorStyle

    Visual tuning of the indicator stroke.

    mainView: View

    Main canvas's view — used to position the visible-window indicator and to preserve scale when the minimap recenters.

    mainViewDims: { height: number; width: number }

    Main canvas's CSS-pixel dims. Used to compute the visible-window rect and the recenter offset.

    onMainViewChange: (next: View) => void

    Setter called on click (single recenter) and during drag (continuous recenter). Receives a View with the same scale as mainView and (x, y) shifted so the pointer's world point lands at the main canvas's center.

    poseBounds?: (pose: TPose) => Bounds

    Pose → AABB. Defaults to identity (pose as Bounds), matching sceneAdapter / useSelectTool.

    Same scene the main canvas is rendering.

    width: number

    Minimap's own CSS-pixel dims.