anvaka / VivaGraphJS

Graph drawing library for JavaScript
Other
3.75k stars 425 forks source link

Disable zoom on mouse scrolling #157

Closed ptommasi closed 9 years ago

ptommasi commented 9 years ago

Is there a way to disable zoom on mouse scrolling? I do have a graph as part of a scrollable view, and when (during the scroll) the mouse end up on top of a graph the view stop to scroll and a zoom take place instead.

It would be useful to have a boolean options in the renderer with a behaviour similar to "mouseWheelZoom" or ".disableZoomWheel()" of OpenLayers3 (that's how I solved the same issue with it).

Thanks!

gg4u commented 9 years ago

Hi,

if you look into vivagraph.js, you will see that there is a parameter: interactive

it accept strings and an array of strings as parameters,

so you could deactivate as you wish:

Have a look here: https://github.com/anvaka/VivaGraphJS/tree/master/demos/other/input-override#no-interaction

ptommasi commented 9 years ago

That solve my problem, I wasn't aware of that parameter!

Thanks very much!