Hiyve Components - v1.0.0
    Preparing search index...

    Interface UseWhiteboardToolsOptions

    Options for the useWhiteboardTools hook

    interface UseWhiteboardToolsOptions {
        canvas: Canvas | null;
        colors?: Partial<WhiteboardColors>;
        initialColor?: string;
        initialTool?: WhiteboardTool;
        initialWidth?: number;
        onObjectAdded?: (object: WhiteboardObject) => void;
        onObjectModified?: (object: WhiteboardObject) => void;
        onSelectionChange?: (objects: WhiteboardObject[]) => void;
        readOnly?: boolean;
        styles?: Partial<WhiteboardStyles>;
        userId: string;
    }
    Index

    Properties

    canvas: Canvas | null

    Fabric.js canvas instance

    colors?: Partial<WhiteboardColors>

    Custom colors

    initialColor?: string

    Initial color

    initialTool?: WhiteboardTool

    Initial tool

    initialWidth?: number

    Initial stroke width

    onObjectAdded?: (object: WhiteboardObject) => void

    Called when an object is added

    onObjectModified?: (object: WhiteboardObject) => void

    Called when an object is modified

    onSelectionChange?: (objects: WhiteboardObject[]) => void

    Called when selection changes

    readOnly?: boolean

    Whether the canvas is read-only

    styles?: Partial<WhiteboardStyles>

    Custom styles

    userId: string

    User ID for object ID generation