File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
reorderable/src/commonMain/kotlin/org/burnoutcrew/reorderable Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,10 @@ abstract class ReorderableState<T>(
9191 .distinctUntilChanged { old, new -> old.firstOrNull()?.itemIndex == new.firstOrNull()?.itemIndex && old.count() == new.count() }
9292
9393 internal open fun onDragStart (offsetX : Int , offsetY : Int ): Boolean {
94+ val x = if (! isVerticalScroll) offsetX + viewportStartOffset else offsetX
95+ val y = if (isVerticalScroll) offsetY + viewportStartOffset else offsetY
9496 return visibleItemsInfo
95- .firstOrNull { offsetX in it.left.. it.right && offsetY in it.top.. it.bottom }
97+ .firstOrNull { x in it.left.. it.right && y in it.top.. it.bottom }
9698 ?.also {
9799 selected = it
98100 draggingItemIndex = it.itemIndex
You can’t perform that action at this time.
0 commit comments