Hosanna UI API v1.30.2-next
    Preparing search index...

    CollectionViewFocusManager manages the focus rectangle and animations for a collection view. It handles focus transitions, rendering, and applying focus to rows and items.

    Implements

    Index

    Constructors

    Properties

    collectionView: ICollectionView & { focusManager: IFocusManager.IFocusManager }

    The collection view instance associated with this focus manager.

    focusIndicatorPoster: ISGNPoster

    The focus rectangle node used to visually indicate the focused item.

    focusInfo: IFocusInfo

    The current focus information.

    focusPercent: number = 0.0

    The current percentage of focus animation completion.

    isAnimatingFocus: boolean = false

    Whether the focus rectangle is currently animating.

    isFocusIndicatorSuppressed: boolean = false
    isFocusShown: boolean = false

    Whether the focus rectangle is currently visible.

    lastSpokenItemIndex: number = -1
    lastSpokenRowIndex: number = -1

    The last spoken row index and item index for text-to-speech feedback.

    nextFocusInfo: IFocusInfo

    The next focus information for transitioning focus.

    nullFocusInfo: IFocusInfo = ...

    A null focus information object used as a fallback.

    textToSpeechManager: ITextToSpeechManager

    Injects the text-to-speech manager for providing audio feedback on focus changes.

    Methods

    • Applies the view status to the specified cell view.

      Parameters

      • rowIndex: number

        The row index of the cell.

      • itemIndex: number

        The item index of the cell.

      • focused: boolean

        Whether the cell is focused.

      • isFootprint: boolean = false

      Returns void

    • Applies focus to the currently focused row in the collection view.

      Parameters

      • focused: boolean

        Whether the row is focused.

      Returns void

    • Creates the focus rectangle node with default properties.

      Returns ISGNPoster

    • Resets focus manager state to initial values. Called when the collection view is cleared (e.g. DataSourceChangeType.Clear).

      Returns void

    • Marks the focus transition as complete and applies the focus to the row.

      Returns void

    • Parameters

      • Optionalscale: number
      • progress: number = 1.0

      Returns void

    • Returns void

    • Updates the appearance of the focus rectangle based on the animation progress.

      Parameters

      • percent: number

        The percentage of focus animation completion.

      Returns void

    • Updates the visibility of the focus rectangle based on the focus chain state.

      Returns void