Tlaster / Zoomable

Easy zoom in and out with drag support for Jetpack Compose
MIT License
80 stars 6 forks source link

wrapContentHeight() #7

Open NoelChew opened 3 years ago

NoelChew commented 3 years ago

Is there anyway we can use Modifier.wrapContentHeight() for Zoomable's modifier?

Tlaster commented 3 years ago

Currently, Zoomable is using BoxWithConstraints and takes its maxWidth and maxHeight, so it's not likely to have support for wrapContent*. And I wonder, if Zoomable does support wrapContent*, what will the behavior be like? Will the Zoomable size change after zoom in/out?

NoelChew commented 3 years ago

Ideally, the Zoomable will take the size of the content. However, the size should not change when zooming in/out.

dhritzkiv commented 2 years ago

One way to achieve this, in the library, is to manipulate the graphicsLayer, or the transformable modifier, instead of layout. I believe that way the original layout/sizing of the content will be preserved.