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

    Interface UseWhiteboardFileOptions

    Options for the useWhiteboardFile hook

    interface UseWhiteboardFileOptions {
        canvas: Canvas | null;
        currentColor?: string;
        enableAutoSave?: boolean;
        fileId: string;
        initialFileData?: WhiteboardFile;
        isOwner: boolean;
        onAfterLoad?: (file: WhiteboardFile) => void;
        onAfterSave?: () => void;
        onBeforeLoad?: () => void;
        onBeforeSave?: () => void;
        onError?: (error: Error) => void;
        onObjectLoaded?: (object: WhiteboardObject) => void;
        styles?: Partial<WhiteboardStyles>;
        userId: string;
    }
    Index

    Properties

    canvas: Canvas | null

    Fabric.js canvas instance

    currentColor?: string

    Current drawing color (to save)

    enableAutoSave?: boolean

    Whether auto-save is enabled

    fileId: string

    File ID to load/save

    initialFileData?: WhiteboardFile

    Initial file data for newly created whiteboards. When provided, the whiteboard will initialize with this data instead of fetching from the server.

    isOwner: boolean

    Whether the current user is the owner

    onAfterLoad?: (file: WhiteboardFile) => void

    Called after load

    onAfterSave?: () => void

    Called after save

    onBeforeLoad?: () => void

    Called before load to set suppress state

    onBeforeSave?: () => void

    Called before save to set suppress state

    onError?: (error: Error) => void

    Called when an async operation fails

    onObjectLoaded?: (object: WhiteboardObject) => void

    Called when object is loaded

    styles?: Partial<WhiteboardStyles>

    Custom styles

    userId: string

    User ID