-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hello,
I'm using the library code as shown below:
AsyncImage(
model = imageRequest,
imageLoader = imageLoader,
modifier = modifier.enhancedZoom(
key = "zoomable",
clip = true,
enhancedZoomState = rememberEnhancedZoomState(
minZoom = .5f,
maxZoom = 10f,
imageSize = IntSize(imageWidth, imageHeight),
limitPan = false,
moveToBounds = true,
),
zoomOnDoubleTap = { zoomLevel: ZoomLevel ->
println("zoomOnDoubleTap")
when (zoomLevel) {
ZoomLevel.Mid -> 3f
ZoomLevel.Min -> 1f
ZoomLevel.Max -> 5f
}
},
enabled = { zoom, pan, rotation ->
zoom > 1f
}
).pointerInput("zoomable") {
detectTapGestures(
onTap = { println("onTap") },
onDoubleTap = { println("onDoubleTap") },
onLongPress = { println("onLongPress") })
},
)
However, I've noticed that using detectTapGestures seems to override the gesture behavior defined in zoomOnDoubleTap. Interestingly, when I use another library (https://github.com/usuiat/Zoomable), I don't encounter this issue. Upon inspecting their source code, I found that they override the behavior of PointerInputScope.detectTransformGestures (https://github.com/usuiat/Zoomable/blob/main/zoomable/src/main/java/net/engawapg/lib/zoomable/Zoomable.kt). Is there a way to ensure that gesture behavior is not overridden in this library?
Thank you.
Metadata
Metadata
Assignees
Labels
No labels