saket / telephoto

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

Support programmatically changing pan/zoom #4

Closed DSteve595 closed 4 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 5 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 4 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