Field Notes
    Preparing search index...

    Interface FieldNotesCanvasProps

    interface FieldNotesCanvasProps {
        changeDebounceMs?: number;
        defaultTool?: string;
        initialData?: string | ImportableCanvasState;
        onChange?: (state: CanvasState) => void;
        onReady?: (viewport: Viewport) => void;
        onToolChange?: (name: string) => void;
        options?: ViewportOptions;
        snapToGrid?: boolean;
        theme?: Theme;
        tool?: string;
        tools?: Tool[] | "default";
    }
    Index
    changeDebounceMs?: number

    Debounce window for onChange in milliseconds (default 250).

    defaultTool?: string

    Uncontrolled initial tool. Ignored when tool is set.

    initialData?: string | ImportableCanvasState

    Mount-only: a saved state (object or JSON string) loaded before onReady.

    onChange?: (state: CanvasState) => void

    Trailing-debounced with the exported state after any change; flushed on unmount.

    onReady?: (viewport: Viewport) => void

    Called once the viewport exists; a throw destroys the viewport and is rethrown.

    onToolChange?: (name: string) => void

    Fires whenever the active tool changes (keyboard, API, or tool prop).

    options?: ViewportOptions

    Constructor-only: changes after mount are ignored (the canvas is stateful).

    snapToGrid?: boolean

    Reactive compatibility toggle for the core snap flag.

    Grid snapping is domain behavior. Configure it through the VTT grid/constraint service instead.

    theme?: Theme

    Reactive. undefined leaves the viewport's theme alone. Hoist a theme object.

    tool?: string

    Controlled active tool. Pair with v-model:tool or onToolChange.

    tools?: Tool[] | "default"

    'default' (mount-only): createDefaultTools() registered before onReady, select active. Omitted: the same bundle after onReady, only if no tools are registered by then. An array is reactive (append-only): tools present here are registered, including ones pushed into a reactive array; removal is not supported, and [] registers nothing.