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

    Function mapKeyToDimension

    • Map number key (1-9) to dimension index using navigable-position mapping.

      Converts keyboard number input to actual dimension indices by mapping key N to the N-th non-displayed (navigable) dimension. This provides an intuitive napari-style UX where keys always start at 1 regardless of how many displayed dimensions exist.

      Parameters

      • key: string

        String representation of number key pressed ('1' through '9')

      • dims: SimpleDims

        Complete dimension configuration with display settings

      Returns number

      Actual dimension index (0-based), or -1 if key is invalid or there aren't enough non-displayed dimensions