saket / telephoto

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

Composables with Modifier.zoomable() aren't drawn on first frame #8

Closed DSteve595 closed 5 months ago

DSteve595 commented 1 year ago

This breaks static previews, though interactive ones work. Maybe check for ZoomableContentLocation.SameAsLayoutBounds, and if present, fallback to ScaleFactor(1, 1) rather than ScaleFactor.Zero?

saket commented 5 months ago

https://github.com/saket/telephoto/commit/7d3a13cd6815a09a6a62ad50bee3aeb15a991a26 fixes this partially by making layout previews work for Modifier.zoomable(). I tried to remove the 1 frame lag as well, but it is slightly involved and may not be worth the effort considering that placeholder images are already displayed without any frame delays.