Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    interface CanvasActionsPorts {
        canvas: HTMLElement;
        events: EventGroup;
        cache: PickedElementCache;
        picking: PickGenerationPort;
        settleTouchNavigation?: () => void;
        allowLinks: boolean;
        openUrl?: (url: string, target: string) => void;
        writeText?: (text: string) => Promise<void> | undefined;
        notify?: (message: string) => void;
        openMenu?: (opts: ContextMenuOptions) => () => void;
        onElementClick?: (payload: ElementPointerPayload) => void;
        onElementContextMenu?: (payload: ElementPointerPayload) => void;
    }
    Index
    canvas: HTMLElement
    events: EventGroup

    Session event group — one dispose() removes every listener below.

    settleTouchNavigation?: () => void

    Discard residual camera damping when a touch release is classified as a tap.

    allowLinks: boolean

    Whether links may be opened at all (allowLinks option / ?noLinks). When false: no navigation, no link menu items, no pointer cursor — but Copy still works, because writing to the clipboard is not navigation.

    openUrl?: (url: string, target: string) => void

    Injected for testability; defaults to window.open.

    writeText?: (text: string) => Promise<void> | undefined

    Injected for testability; defaults to navigator.clipboard.writeText.

    notify?: (message: string) => void

    Injected for testability; defaults to showToast.

    openMenu?: (opts: ContextMenuOptions) => () => void

    Injected for testability; defaults to openContextMenu.

    Type Declaration

      • (opts: ContextMenuOptions): () => void
      • Open a context menu at (x, y). Returns a close handle (idempotent). Only one context menu exists at a time.

        Parameters

        Returns () => void

    onElementClick?: (payload: ElementPointerPayload) => void
    onElementContextMenu?: (payload: ElementPointerPayload) => void