flxzt / rnote

Sketch and take handwritten notes.
https://rnote.flxzt.net
GNU General Public License v3.0
6.42k stars 214 forks source link

Made the zoom tool zoom towards the initially selected location #1080

Closed JonathanGodar closed 2 months ago

JonathanGodar commented 2 months ago

As mentioned in #914 the zoom tool zooms towards the center of the screen. This PR makes the zoom tool zoom towards the selected start location. As mentioned in previous issues this makes navigating with a drawing tablet easier.

Area of improvement

The "zoom formula" is copied from this file. I think that there may be a need for a function in the camera to have a zoom_towards function. However I don't feel quite comfortable enough yet with the codebase to make that happen.

flxzt commented 2 months ago

nice, thanks a lot!

I don't think it's too critical to re-use this behaviour in a method, but if you want you could of course follow-up with a refactor, that would definitely be appreciated :slightly_smiling_face: