viewerjs
viewerjs copied to clipboard
zoom/rotate based on center of screen instead of center of image
Hi,
Image manipulation tools (zoom/rotate) all operate based on the center of the image. So when for example the image is very tall and zoomed in. The center of the image is way outside the screen. Rotating the image will make it disappear.
Making the operations work based on the center of the screen fixes these problems and feels more natural to the end user (IMO).
Thanks
Same goes for the '1:1' button: when zoomed in on a specific part of the image (say the left top corner) and pressing the '1:1' button, the images disappears from the screen. Pressing the 'reset' button re-positions the image.
IMHO this is a bug, not an enhancement.
- When calling the
zoom
orrotate
methods, the zoom / rotate center is the center of the canvas (image wrapper). - When zoom by wheel or touch, the zoom center is the position of the pointer.
But it should be possible the center the image on screen when pressing the '1:1' button.