swimlane / ngx-graph

Graph visualization library for angular
https://swimlane.github.io/ngx-graph
MIT License
922 stars 285 forks source link

Completely disable MouseWheelDirective if not needed #516

Open novarx opened 1 year ago

novarx commented 1 year ago

This makes it possible to still listen to onMouseWheel Events when no Zoom/Trackpad is enabled.

What kind of change does this PR introduce?

What is the current behavior?

It's currently not possible to listen to any mouseWheel Event, when hovering over the graph area, which i.e. prevents the page from scrolling. his behavior is because of MouseWheelDirective::mouseWheelFunc resp. event.preventDefault() which is always called, no matter if it is used or not.

What is the new behavior?

This Change makes it possible to still listen to onMouseWheel Events, if Zoom and Trackpad is disabled, over the graph.

Does this PR introduce a breaking change?

novarx commented 1 year ago

If you need an working example, let me know.

novarx commented 5 months ago

@marjan-georgiev Any chance to get a review on that?