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

    Interface UseWhiteboardToolsResult

    Tools hook return type

    interface UseWhiteboardToolsResult {
        clearSelection: () => void;
        createShape: (
            type: "circle" | "rect" | "triangle" | "text",
            position: Position,
            options?: ShapeOptions,
        ) => WhiteboardObject | null;
        currentColor: string;
        currentTool: WhiteboardTool;
        currentWidth: number;
        deleteSelected: () => void;
        isDrawingMode: boolean;
        selectedObjects: WhiteboardObject[];
        setCurrentColor: (color: string) => void;
        setCurrentTool: (tool: WhiteboardTool) => void;
        setCurrentWidth: (width: number) => void;
    }
    Index

    Properties

    clearSelection: () => void

    Clear selection

    createShape: (
        type: "circle" | "rect" | "triangle" | "text",
        position: Position,
        options?: ShapeOptions,
    ) => WhiteboardObject | null

    Create a shape at position

    currentColor: string

    Current drawing color

    currentTool: WhiteboardTool

    Current tool

    currentWidth: number

    Current stroke width

    deleteSelected: () => void

    Delete selected objects

    isDrawingMode: boolean

    Whether canvas is in drawing mode

    selectedObjects: WhiteboardObject[]

    Selected objects

    setCurrentColor: (color: string) => void

    Set current color

    setCurrentTool: (tool: WhiteboardTool) => void

    Set current tool

    setCurrentWidth: (width: number) => void

    Set current stroke width