Closed CharlesMoreira1 closed 2 months ago
@CharlesMoreira1 Thanks for using Zoomable.
Modifier.zoomable is effective for a composable function. It is not intended to be used to zoom a portion of a composable function.
In your code, all the rectangles are drawn in the Canvas to which you are applying zoomable. Therefore, all the rectangles will zoom at the same time.
If you want to zoom individual rectangles, you need to draw one rectangle in one Canvas and apply zoomable to each Canvas. (But if composables are overlapped, the gesture may not be detected properly...)
Excellent explanation! I actually tried several things, so I changed from Canvas to Composable and now I'm able to use zoomable very well. Thank you very much!
Hi!
I'm trying to add zoom to the rectangles I drew with canvas, using rememberZoomState. However, when I zoom in one, it zooms in all of them, and the idea is to zoom them individually.
I know I could do something similar using pointerInput, but the idea is to use the library.
Could you tell me if this would be possible?
My Code: