Zoom and pan are buggy
Opened this issue · 1 comments
When zooming in, panning, and then zooming out partially, the picture gets stuck with part of it off screen and can't be panned back. This issue appears on all devices I've tested on, but iOS devices have it the worst. The zoom does not return to normal on iOS at all.
Another odd thing is that minimum zoom level allowed. For some reason, it is smaller than the original size of the photo. I think that the minimum zoom level should be either the original size of the photo, or in the case of a large photo, the size of the viewport (like you would get with background-size: contain
).
When zooming in, panning, and then zooming out partially, the picture gets stuck with part of it off screen and can't be panned back
It happens to me only with IOS or safari browser in desktop. I'm going to fix it.
Another odd thing is that minimum zoom level allowed
The minimum zoom is defined by: Math.pow(1 / ZOOM_STEP, 10)
. With the current ZOOM_STEP, its like 38% of the original photo. I think that in some cases it may be useful to have a min zoom level, but maybe 38% its too much. Let me think about it.