Closed evant closed 7 months ago
A user-zoom factor that goes from 1 when all the way 'zoomed out' to whatever the max zoom is.
ZoomableState
maintains this state internally but only exposes the final zoom factor. Will it be sufficient to expose these two values in some fashion?
I'd like it to follow any zooms & translates the user makes.
Do you have a video of an app that does this by any chance? I think I mostly understand your usecase but it'd be nice to confirm my assumptions by seeing something in action.
Ah yep that should! Reading from userZoom
is exactly what I'm looking for.
I think you can see a good example of what I'm looking to do by editing a photo and google photos and using the markup tool to mark on it.
Got it. I'll try coming up something. 👍
I think you can see a good example of what I'm looking to do by editing a photo and google photos and using the markup tool to mark on it.
This screen?
Or were you referring to this cropping tool? It has an overlay but it does not follow the image. It stays centered.
https://github.com/saket/telephoto/assets/2387680/fc994bdd-4e5c-4f20-9176-4353ef6e08a5
The first one, note that when you draw on the image it tracks when you zoom/pan around.
Gotcha!
@evant Wanna try out 0.7.0-SNAPSHOT
to see if you're able to use this?
I'm trying to overlay the image with an aspect ratio box and I'd like it to follow any zooms & translates the user makes. Unfortunately the accessed zoomFraction includes the initial scale of the image to scale to fit so I don't know what zoom factor to apply to my overlay to match. I think either of the below that would be sufficient: