Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Class ControlRail

    Index
    • Build the rail DOM, wire the global listeners, and mount it in the viewer container. Items are rendered in the order given; the rail starts collapsed if the user left it that way last session.

      Parameters

      • items: ControlRailItem[]
      • Optionalfooter: HTMLElement

        Optional element docked at the rail's bottom (e.g. the perf readout).

      Returns ControlRail

    root: HTMLDivElement
    container: HTMLElement
    buttons: Map<string, HTMLButtonElement> = ...
    overlay: RailOverlay

    Flyout + panel-popover lifecycle (only one open at a time).

    disposeLongPress: () => void

    Long-press → the same context popovers right-click opens (touch).

    hint?: HTMLDivElement
    hintAutoHideTimer?: number
    hintFadeTimer?: number
    idleTimer?: number
    refreshRaf?: number
    disposed: boolean = false
    collapsed: boolean = false
    footer?: HTMLElement

    Optional element docked at the rail's bottom (e.g. the perf readout).

    • The chevron handle that collapses the rail to a stub and expands it back.

      Returns HTMLButtonElement

    • Collapse to just the handle, or expand back to the full rail.

      Parameters

      • collapsed: boolean
      • persist: boolean = true

      Returns void

    • Run an item's optional render hook fail-soft — a throwing hook must not abort the refresh loop for the other buttons (matches the guarded activate/isActive callbacks elsewhere in this class).

      Parameters

      Returns void

    • Bring the rail to full opacity and restart the idle-fade countdown.

      Returns void

    • Arm the idle timer that dims the rail once the pointer stays away.

      Returns void

    • Reflect fullscreen state — the rail hides (hover-to-reveal) in fullscreen.

      Returns void

    • Re-read every item's active/disabled state and repaint the buttons.

      Returns void

    • Show the one-time 'controls live here' hint, unless it was seen before.

      Returns void

    • Auto-hide path: fade the hint out, then dismiss (and persist) for real.

      Returns void

    • Remove the hint for good and remember that the user has seen it.

      Returns void

    • Open the 'context'-trigger popover of the rail button under target, if any — the shared body of the right-click delegate and the touch long-press. A disabled button or a button without such a popover is a no-op (the native menu is still suppressed by the caller).

      Parameters

      • target: HTMLElement | null

      Returns boolean

    • Apply side effects for a keydown handled by the official input router.

      Returns void

    • Close the transient flyout / popover without disposing the rail.

      Returns void

    • Tear down listeners, timers, the overlay and the rail DOM. Idempotent.

      Returns void