photo_view
photo_view copied to clipboard
[BUG] Unable to view the next picture
initialScale: PhotoViewComputedScale.contained * 0.8
When I set the initialScale, when I view the picture for the first time, I can’t slide to the next picture. The sliding area is very small. Only a little bit on the four sides of the picture can slide successfully, but when I slide to the next picture successfully After that the problem disappeared
My problem is caused by initialScale, remove it
PhotoViewGalleryPageOptions( imageProvider: AssetImage("images/pavlova.jpg"), // initialScale: PhotoViewComputedScale.contained, minScale: PhotoViewComputedScale.contained * (0.5 + index / 10), maxScale: PhotoViewComputedScale.covered * 4.1, heroAttributes: PhotoViewHeroAttributes(tag: item.id), )
At 2021-01-20 17:26:17, "lan2000" [email protected] wrote:
I also encountered the same problem. Only occasionally can I slide the picture at the border of the screen. How to solve it, thank you.
PhotoViewGalleryPageOptions( imageProvider: AssetImage("images/pavlova.jpg"), initialScale: PhotoViewComputedScale.contained, minScale: PhotoViewComputedScale.contained * (0.5 + index / 10), maxScale: PhotoViewComputedScale.covered * 4.1, heroAttributes: PhotoViewHeroAttributes(tag: item.id), )
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I don't know if it's related but in my case I also noticed that when initialScale
and minScale
were both set to PhotoViewComputedScale.contained
I have to swipe twice in the same direction for the gesture to take; the first swipe is ignored. If I try to swipe in alternating opposite directions nothing happens. However, if I swipe fast (before the image "settles") it works fine.
As a workaround, I multiplied PhotoViewComputedScale.contained * 0.99
to fix it. I never would've figured that out without this issue report, so thanks for that!