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

    Interface UseWhiteboardSyncOptions

    Options for the useWhiteboardSync hook

    interface UseWhiteboardSyncOptions {
        canvas: Canvas | null;
        fileId: string;
        isOwner: boolean;
        onError?: (error: Error) => void;
        onRemoteCanvasCleared?: () => void;
        onRemoteObjectAdded?: (object: WhiteboardObject) => void;
        onRemoteObjectModified?: (object: WhiteboardObject) => void;
        onRemoteObjectRemoved?: (objectId: string) => void;
        onStateReceived?: () => void;
        styles?: Partial<WhiteboardStyles>;
        userId: string;
    }
    Index

    Properties

    canvas: Canvas | null

    Fabric.js canvas instance

    fileId: string

    File ID for this whiteboard

    isOwner: boolean

    Whether the current user is the owner

    onError?: (error: Error) => void

    Called when an async operation fails

    onRemoteCanvasCleared?: () => void

    Called when canvas is cleared by remote

    onRemoteObjectAdded?: (object: WhiteboardObject) => void

    Called when a remote object is added

    onRemoteObjectModified?: (object: WhiteboardObject) => void

    Called when a remote object is modified

    onRemoteObjectRemoved?: (objectId: string) => void

    Called when a remote object is removed

    onStateReceived?: () => void

    Called when full state is received

    styles?: Partial<WhiteboardStyles>

    Custom styles

    userId: string

    User ID