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

    Function normalizeWheelDeltaWithAxisFallback

    • Normalize the axis carrying a Shift+wheel gesture.

      Some browsers move a standard mouse wheel's delta from deltaY to deltaX while Shift is held. Prefer deltaY whenever it is non-zero, then fall back to deltaX; this preserves genuine two-axis events while making the swapped-axis gesture usable. Callers must opt in deliberately: ordinary horizontal trackpad scrolling must not become zoom, FOV, or forward motion.

      Parameters

      • event: WheelEvent

        The wheel event whose carrying axis should be normalized.

      • Optionalelement: HTMLElement | null

        Optional page-height source, as in normalizeWheelDelta.

      Returns number

      A pixel-equivalent delta from deltaY, or deltaX when deltaY is zero.