findTargetIndexForDragY
fun findTargetIndexForDragY(dragCurrentY: Double, layout: CardListLayout, cards: List<CardLayoutItem>, params: CardListLayoutParameters): Int
Finds the target index for a dragged card given its current Y position.
Return
target index position in the list clamped to [0, cards.size - 1].
Parameters
dragCurrentY
current vertical position of the dragged card.
layout
computed CardListLayout.
cards
list of cards in current display order.
params
layout configuration parameters.