Zoomable icon indicating copy to clipboard operation
Zoomable copied to clipboard

zoom focus area

Open alireza23 opened this issue 4 years ago • 2 comments

Hi! currently when I use pinch zoom, the zoom occurs at the center of screen. How can I make it to zoom just when I put my fingers? (center of zoom beneath my fingers instead of center of screen) and it would be more natural to enable panning with 2 fingers (while zooming occurs simultaneously) if user moves both fingers at the same direction ! thanks for great library

alireza23 avatar Sep 06 '21 05:09 alireza23

I'm not sure if you're talking about an image inside Zoomable or anything else. But for image, using this enables you to zoom your content keeping centre the point where you tapped/pinched.

val size = painter.intrinsicSize
val aspectRatio = runCatching { size.width / size.height }.getOrDefault(1f)

Image(
   modifier = Modifier.aspectRatio(aspectRatio)
   // ...
) 

thedroiddiv avatar Jul 17 '23 15:07 thedroiddiv

And for your second question, I think it is already implemented. @alireza23 if both your queries are resolved, we can close the issue.

@Tlaster

thedroiddiv avatar Jul 17 '23 15:07 thedroiddiv