jgraph / drawio

draw.io is a JavaScript, client-side editor for general diagramming.
https://www.drawio.com
Other
40.8k stars 7.58k forks source link

Grid jump while zoom #1440

Open TheZooKeeper opened 3 years ago

TheZooKeeper commented 3 years ago

When zooming in and out using ctrl+scroll wheel, the screen position will perform a big jump if ctrl is let up before the scroll wheel is done moving. It is important to note that the jump only occurs if the scroll wheel moves before the grid is finished redrawing.

sonebu commented 3 years ago

I can confirm this still exists in draw.io version 14.4.3

My guess is that this is related to this place and/or this place in the source code. However, this feels like it could also be a timing issue of some sort and I'm not sure if that can completely be fixed in a reliable manner without major changes (like the order in which the "main loop" checks these conditions probably matters since they take up finite time). Maybe a small fix could be delaying the falling edge of the isZoomWheelEvent a little bit after the ctrl key is released?

Overall -> seems to me like the main problem is that draw.io switches from "let's scroll-zoom" to "let's scroll-translate-over-the-document" too fast so the lack of synchronization between the user's two hands comes into the picture and draw.io scrolls like crazy (the jumps weren't random as far as I could gather, they always tend to happen in the direction of the scrolling when the ctrl key is released)

By the way I'm a complete noob in JS and the experiments I made are not air-tight, so please correct me if anything above is wrong.

lumeche commented 3 years ago

I also have the same problem

thesuavehog commented 2 years ago

I also find this extremely frustrating as I am constantly working on large documents where I need to zoom out/in all the time. It's one of the key issues with draw.io that impacts my productivity (collectively making it "cheaper" to pay for Visio based on time savings than use draw.io).

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

iikuzmychov commented 1 year ago

This issue is NOT stale!

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. See the FAQ for more information.

iikuzmychov commented 3 months ago

Still not stale