ANU-Rocketry / control-panel

Control panel for ANU Rocketry's liquid rocket engine testing platform
3 stars 0 forks source link

Disabled page scroll issue #9

Open OliverBalfour opened 2 years ago

OliverBalfour commented 2 years ago

We use a library to prevent the touchpad scroll motion from scrolling the page while the mouse is over the graph because it scrolls the graph time window.

I tried using event.stopPropagation() and event.preventDefault() but both failed but the library mostly works (I disable page scrolling when you mouse over the graph and vice versa). However, if you alt tab away from the control panel while the mouse is over the graph, you can end up with the mouse being perpetually locked.

For the time being, I've exposed the enable/disable page scroll functions to the JS window object so you can call them from the JS console, but it'd be nice to fix this properly without console or page reload.

Some rough ideas: