quick-picture-viewer icon indicating copy to clipboard operation
quick-picture-viewer copied to clipboard

Increazing zoom doesn't zoom at center of current view

Open ExtReMLapin opened this issue 5 years ago • 3 comments

When you press CTRL+Mouse Wheel

Example :

Current pix with resolution that doesn't matter is zoomed and rendered at resolution of 500x500

Picture is centered so zoom center is at 250x250

You zoom with ctrl+Mouse Wheel

new render resolution is 600*600 but it sets center to 250*250 instead of 300*300

video https://www.youtube.com/watch?v=SvjfN36HtNE&feature=youtu.be

ExtReMLapin avatar Nov 08 '20 18:11 ExtReMLapin

Yea the zoom is always anchored to the top left, i would love to have a mouse-centered zoom (thats the only thing the built in photos app does better currently) - otherwise just awesome app, so much clever features i absolutly need, now that i know they exist <3

ueen avatar May 06 '22 10:05 ueen

It's actually pretty easy to do, I had to do it multiple times with canvas on web applications.

The idea at the end of the day is to be sure your mouse is at the same relative position on your image (in percentage, not in pixel).

ExtReMLapin avatar May 08 '22 09:05 ExtReMLapin

Awesome, are you maybe able to do a PR? @ExtReMLapin 😍

ueen avatar May 08 '22 10:05 ueen