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
Hi, great Project! Zooming the canvas in and out with the mouse wheel would feel a lot more natural, if the center of the zoom were the location of the mouse pointer. It's been a few years, but I've already implemented such a zoom in a project of mine. If you want to take a look it's linked below.
P.S. I tried running the project locally to try and get a PR going, but I ran into some issues which I think might be related to Windows paths. If you're interested, I can share details.
The text was updated successfully, but these errors were encountered:
This is actually not easy task. I tried to implement zoom around a center when I made this zoom feature and failed. Main problem here is browser scrollbar. I didn't expect that handling browser scrollbar will be such hard task, every time you do something, you should also correct scroll offset. So, when zooming around center you should do some complex calculations to find new scroll offset. I tried this, but scrollbar acted weird, often jumping to wrong positions.
Possible solution here is to get rid of browser scrollbar and either use custom scrollbar or just use mouse drag for scrolling without scrollbar at all. My code for handling these interaction is not very good :) My plans were to rewrite that part and to use ready external library like https://github.com/bcakmakoglu/vue-flow/ (they don't have scrollbars) - but this would consume too much time.
Hi, great Project! Zooming the canvas in and out with the mouse wheel would feel a lot more natural, if the center of the zoom were the location of the mouse pointer. It's been a few years, but I've already implemented such a zoom in a project of mine. If you want to take a look it's linked below.
https://github.com/marvk/vatprism/blob/6dcdf04ba1f8c6fe67c5b2590ba4162009bde5f2/src/main/java/net/marvk/fs/vatsim/map/view/map/MapView.java#L317-L336
P.S. I tried running the project locally to try and get a PR going, but I ran into some issues which I think might be related to Windows paths. If you're interested, I can share details.
The text was updated successfully, but these errors were encountered: