chevron_right Demos chevron_right Mouse Wheel Customization
Related demos
Book a live Demo

Live Demo — yFiles in Action

30–45 min | Online | No install required

For Developers, Product Mangers & Executives

  • Interactive graph visualization in real time
  • Integration example
  • Live Q&A and next step recommendations

30–45 minutes | 1:1 or team session | Online (Zoom / Teams)

No install required | We show live code

Book a free live demo

Live Demo — yFiles in Action

30–45 min | Online | No install required

For Developers, Product Mangers & Executives

30–45 minutes | 1:1 or team session | Online (Zoom / Teams)

No install required | We show live code

Book a free live demo

Graph Settings

Wheel Behavior Modifiers
Wheel Zoom Factor Wheel Scroll Factor

Mouse Wheel Customization Demo

This demo shows how to customize and enhance the default mouse wheel behavior.

The mouse wheel behavior can be configured to zoom or scroll the graph, or do both, with additional modifiers being pressed.

When scrolling, the scroll direction can be switched between vertical and horizontal scrolling using a modifier key (Shift by default, Ctrl for the alternative modifier scheme configured in this demo).

When both scrolling and zooming is enabled, switch from scrolling to zooming using the respective modifier (Ctrl by default, Alt for the alternative modifier scheme).

The Modifiers dropdown lets you switch between the default and an alternative modifier scheme. In code, the modifiers, as well as other conditions, can be configured freely.

When the Scroll, Zoom and Resize option is selected, a custom listener to the Wheel event of the CanvasComponent allows to resize the selected nodes by pressing both, Shift and Ctrl.

The settings Wheel Zoom Factor and Wheel Scroll Factor allow to adjust the amount that's zoomed or scrolled on each turn of the mouse wheel. Additionally, the system's mouse settings determine how far the graph is zoomed or scrolled.

Things to Try