Skip to content

Commit ce4db88

Browse files
committed
Update CVFloatingZoomView to set initial point when null, busy and interaction starts
1 parent 4634a7f commit ce4db88

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/image-slider/src/main/java/com/trendyol/uicomponents/imageslider/CVFloatingZoomView.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ class CVFloatingZoomView(
8989
initialZoomPoint = Point(initialPoint!!.x, initialPoint!!.y)
9090
leftoverZoom = 0f
9191
} else if (isBusy && isInteractionStartEvent(event, motionEvent)) {
92+
if (initialPoint == null) {
93+
initialPoint = Point(currentCenter!!.x, currentCenter!!.y)
94+
}
9295
onFingerCountChange(event, FingerSwapState.TWO_FINGER)
9396
leftoverZoom = floatingImage.scaleX - 1
9497
initialDifference =

0 commit comments

Comments
 (0)