Skip to content

Commit 9eda6bb

Browse files
rename ZoomState onDoubleTap function to resetWithAnimation
1 parent b353e51 commit 9eda6bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

image/src/main/java/com/smarttoolfactory/image/zoom/ZoomModifier.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fun Modifier.zoom(
8686
zoomLevel = newZoomLevel
8787

8888
coroutineScope.launch {
89-
zoomState.onDoubleTap(
89+
zoomState.resetWithAnimation(
9090
zoom = newZoom,
9191
rotation = zoomState.rotationInitial
9292
)
@@ -194,7 +194,7 @@ fun Modifier.zoom(
194194
zoomLevel = newZoomLevel
195195

196196
coroutineScope.launch {
197-
zoomState.onDoubleTap(
197+
zoomState.resetWithAnimation(
198198
zoom = newZoom,
199199
rotation = zoomState.rotationInitial
200200
)
@@ -302,7 +302,7 @@ fun Modifier.zoom(
302302
zoomLevel = newZoomLevel
303303

304304
coroutineScope.launch {
305-
zoomState.onDoubleTap(
305+
zoomState.resetWithAnimation(
306306
zoom = newZoom,
307307
rotation = zoomState.rotationInitial
308308
)

image/src/main/java/com/smarttoolfactory/image/zoom/ZoomState.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ open class ZoomState internal constructor(
237237
}
238238
}
239239

240-
internal open suspend fun onDoubleTap(
240+
internal open suspend fun resetWithAnimation(
241241
pan: Offset = Offset.Zero,
242242
zoom: Float = 1f,
243243
rotation: Float = 0f

0 commit comments

Comments
 (0)