NyanCAD / Mosaic

A modern schematic entry and simulation program
https://nyancad.github.io/Mosaic/
Mozilla Public License 2.0
67 stars 5 forks source link

See video for strange drag behavior #75

Open jellebakker96 opened 2 years ago

jellebakker96 commented 2 years ago

https://user-images.githubusercontent.com/35449392/162637067-4e522fc6-6e70-4aff-b2e8-0da7897bae77.mp4

pepijndevos commented 2 years ago

Same bug as #63

pepijndevos commented 2 years ago

Hmmm can't actually reproduce this problem on either Firefox or Chrome. Can you still reproduce this with the fixes in #63 and #58 in place?

pepijndevos commented 2 years ago

And, do you need to do anything special? Like, does it only happen when zoomed out or after some other action, or is dragging always at double the speed?

jellebakker96 commented 2 years ago

No, I do not need to do anything special. It happens when I am zoomed out and when I am not zoomed out. It also happens on both my laptop and PC. My pc has a 4k display and my laptop has 1080p plus 5120x1440p displays.

jellebakker96 commented 2 years ago

I also see that sometimes when I am dragging that suddenly the zoom-in function gets enabled.

jellebakker96 commented 2 years ago

This zoom-in function then keeps zooming in as long as I keep the middle mouse button pressed

pepijndevos commented 2 years ago

I have started a windows VM with Google Chrome and still can't reproduce the problem :(

Does it always drag at double speed? Does it happen in Firefox and Edge? (if you have them) Does it happen with the pan tool? (space bar) Does it happen with another mouse? (if you have one)

I really have no idea what is going on. I could try some blind fixes, but without a way to test them...

pepijndevos commented 2 years ago

I've tried a random fix in 3fb4d56facf7639f7a45ca940e58f10640e7cc96 does that help?

jellebakker96 commented 2 years ago

Does it always drag at double speed? Yes Does it happen in Firefox and Edge? (if you have them) no, only in edge and chrome, not firefox. The zoom-in behavior happens in all three browsers Does it happen with the pan tool? (space bar) Yes Does it happen with another mouse? (if you have one) Yes

jellebakker96 commented 2 years ago

I've tried a random fix in 3fb4d56 does that help?

No

pepijndevos commented 2 years ago

:(

Also works fine on Sonya's laptop. straaaange.

jellebakker96 commented 2 years ago

Strange, did you add a logger such that I can send logs back to you?

pepijndevos commented 2 years ago

I figured it out!!! Do you have your display setting set to more than 100%? I see the same behavior when I set my scaling to 200%

jellebakker96 commented 2 years ago

Yes

jellebakker96 commented 2 years ago

All, my displays have the scaling set to >100%

pepijndevos commented 2 years ago

Ok once a1f409ea9eb8e1f76fdf64d8bdacf7b8b791c6e2 makes it to the web, it should be fixed?!

jellebakker96 commented 2 years ago

I now know what causes the zoom-in bug. First start dragging with your middle mouse button and then (while still having pressed your middle mouse button) start scrolling to zoom out. Instead of zooming out, you will start to zoom in.