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
If the parent container has a transform attribute and there is a big gap between the width and height of the image, can't move left or right after zooming.
In general, zooming in a bit along the top left corner will reproduce the problem.
Reading through the code, I found that when binding the dragScrollableObserver, it checks to see if it's within the maximum allowable movement area. but after scaling, the value of content.currentLeft has exceeded maxAvailableLeft, making it impossible to move left and right.
The way I'm handling it now is that when I rescale, I check to see when maxAvailableLeft has been exceeded, and if it has, I set the value of content.currentLeft to maxAvailableLeft.
I'm not sure if this problem occurs in other cases, I tested it without transform and it's normal.
Finally, thank you for your work!
The text was updated successfully, but these errors were encountered:
Thanks for the lib!
It's looks like a special case bug.
If the parent container has a transform attribute and there is a big gap between the width and height of the image, can't move left or right after zooming.
Reproduction link: https://codesandbox.io/p/sandbox/vanilla-js-wheel-zoom-bug-report-68kzp7
In general, zooming in a bit along the top left corner will reproduce the problem.
Reading through the code, I found that when binding the dragScrollableObserver, it checks to see if it's within the maximum allowable movement area. but after scaling, the value of content.currentLeft has exceeded maxAvailableLeft, making it impossible to move left and right.
The way I'm handling it now is that when I rescale, I check to see when maxAvailableLeft has been exceeded, and if it has, I set the value of content.currentLeft to maxAvailableLeft.
I'm not sure if this problem occurs in other cases, I tested it without transform and it's normal.
Finally, thank you for your work!
The text was updated successfully, but these errors were encountered: