saket / telephoto

Building blocks for designing media experiences in Compose UI
https://saket.github.io/telephoto/
Apache License 2.0
935 stars 29 forks source link

Support programmatically changing pan/zoom #4

Closed DSteve595 closed 3 months ago

DSteve595 commented 1 year ago

It would be nice to be able to programmatically manipulate the transformation of the image, initially and over time. Use cases:

nateridderman commented 3 months ago

A map wants to start viewing a specific location

💯 this is my use case. This library is awesome, and this issue is the one thing it's missing before I can adopt it in my app.

saket commented 3 months ago

The next release will introduce new APIs for controlling an image's pan and zoom. @nateridderman will this solve your use case?

https://github.com/saket/telephoto/blob/f0201b80d627ba1950ee460db14c132b3406e553/zoomable/src/commonMain/kotlin/me/saket/telephoto/zoomable/ZoomableState.kt#L146-L190