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

    Interface UseGridCellHoverOptions

    Options for useGridCellHover.

    interface UseGridCellHoverOptions {
        enabled?: boolean;
        onChange?: (cell: { col: number; row: number } | null) => void;
        origin?: { x: number; y: number };
        ref: RefObject<HTMLElement | null>;
        spacing: UnitValue;
        unitSystem?: UnitSystem;
        view: () => ViewTransform;
    }
    Index

    Properties

    enabled?: boolean

    Disable the listeners without unmounting. Default true.

    onChange?: (cell: { col: number; row: number } | null) => void

    Fires when the hovered cell changes (including to/from null). Use it to invalidate your layer renderer.

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

    Origin the cell grid is anchored to, in world units. Default (0, 0).

    ref: RefObject<HTMLElement | null>

    Element to attach pointer listeners to (typically the canvas).

    spacing: UnitValue

    Cell spacing in world units. Same value you pass to createGridLayer and createCellHighlightLayer.

    unitSystem?: UnitSystem

    Required if spacing is tagged (e.g. { value: 1, unit: 'ft' }).

    view: () => ViewTransform

    Read the current view transform. Called on every pointermove so it can reflect live pan/zoom without a re-binding step.