Skip to content

Commit f8da3e4

Browse files
move zoom, pan, rotate animation check to ZoomState
1 parent 77d11ed commit f8da3e4

File tree

1 file changed

+11
-0
lines changed
  • image/src/main/java/com/smarttoolfactory/image/zoom

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,17 @@ open class ZoomState internal constructor(
189189
val rotation: Float
190190
get() = animatableRotation.value
191191

192+
val isZooming: Boolean
193+
get() = animatableZoom.isRunning
194+
195+
val isPanning: Boolean
196+
get() = animatablePan.isRunning
197+
198+
val isRotating: Boolean
199+
get() = animatableRotation.isRunning
200+
201+
val isAnimationRunning = isZooming || isPanning || isRotating
202+
192203
val zoomData: ZoomData
193204
get() = ZoomData(
194205
zoom = zoom,

0 commit comments

Comments
 (0)