Does anyone know how to prevent your web browser from scrolling on wheel events?
I’m trying to scroll through a 3D data set, using the mouse wheel to scroll through the z-axis. The code below works great, but the web browser will still scroll on these events. I could not find the Bokeh source code that illustrates how they do this for WheelZoomTool. Presumably this requires some custom JS?
You'll probably need to make a custom extension to do this, I doubt it's possible using only the event. The existing wheel zoom tool implementation is here:
You can probably gut it and make a "do-nothing" scroll tool extension. Just be virtue of being activated/deactivated the stop propagation mode will be enabled or disabled. Then the python event will be useful while the tool is active.
Does anyone know how to prevent your web browser from scrolling on wheel events?
I'm trying to scroll through a 3D data set, using the mouse wheel to scroll through the z-axis. The code below works great, but the web browser will still scroll on these events. I could not find the Bokeh source code that illustrates how they do this for WheelZoomTool. Presumably this requires some custom JS?
You’ll probably need to make a custom extension to do this, I doubt it’s possible using only the event. The existing wheel zoom tool implementation is here:
You can probably gut it and make a “do-nothing” scroll tool extension. Just be virtue of being activated/deactivated the stop propagation mode will be enabled or disabled. Then the python event will be useful while the tool is active.
Does anyone know how to prevent your web browser from scrolling on wheel events?
I’m trying to scroll through a 3D data set, using the mouse wheel to scroll through the z-axis. The code below works great, but the web browser will still scroll on these events. I could not find the Bokeh source code that illustrates how they do this for WheelZoomTool. Presumably this requires some custom JS?