computeCardVisualState

fun computeCardVisualState(cardIdentifier: String, index: Int, cards: List<CardLayoutItem>, layout: CardListLayout, params: CardListLayoutParameters, focusedCardIdentifier: String?, draggedCardIdentifier: String?, dragCurrentY: Double): CardVisualState

Computes the visual state for a card given its position and interaction state.

Return

CardVisualState containing y, scale, elevation, zIndex, and alpha.

Parameters

cardIdentifier

identifier of the card.

index

index of the card in the current display order.

cards

list of cards in current display order.

layout

computed CardListLayout.

params

layout configuration parameters.

focusedCardIdentifier

identifier of the currently focused card, if any.

draggedCardIdentifier

identifier of the card being dragged, if any.

dragCurrentY

current vertical position of the dragged card.