You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package has been working pretty good but I have problems with scaling when screen orientation is changed.
I am trying to scale image by width and always by default zoom farthest away to fit image from left edge of screen to right edge of screen.
I've looked at some of source code and looks like in ComponentDidUpdatethis.zoomLevel = initialZoom; changes correctly when orientation is changed but in render method zoomAnim stays at previous scale.
I am pretty certain that component needs to be rerendered on orientation change or zoomAnim change, I've tried patching this in my code base but It have pretty annoying delay:
As you can see there is pretty annoying delay when changing orientation from portrait to landscape and from landscape to portrait, especially because first screen orientation changes, then image rotates, then image is zoomed and at last component is forceRerenderd making it scale properly but at expense of slow and choppy UI updates.
The text was updated successfully, but these errors were encountered:
This package has been working pretty good but I have problems with scaling when screen orientation is changed.
I am trying to scale image by width and always by default zoom farthest away to fit image from left edge of screen to right edge of screen.
I've looked at some of source code and looks like in ComponentDidUpdate
this.zoomLevel = initialZoom;
changes correctly when orientation is changed but inrender
methodzoomAnim
stays at previous scale.Here's minimal code example:
Video example of what is currently happening:
Screencast.from.12-22-2023.09.39.53.AM.webm
I am pretty certain that component needs to be rerendered on orientation change or zoomAnim change, I've tried patching this in my code base but It have pretty annoying delay:
Patch example:
Video of patch preview
Screencast from 12-22-2023 10:03:19 AM.webm
As you can see there is pretty annoying delay when changing orientation from portrait to landscape and from landscape to portrait, especially because first screen orientation changes, then image rotates, then image is zoomed and at last component is forceRerenderd making it scale properly but at expense of slow and choppy UI updates.
The text was updated successfully, but these errors were encountered: