chevron_right Demos chevron_right Mouse Wheel Customization
Discover More
Book a live Demo

See yFiles in action

30 min • Online • No install required


For developers, PMs & tech leads

  • Quick-start walkthrough + a real integration example
  • Live Q&A with next-step recommendations

Prefer another tool over Zoom? Just say so when you book.

Opens our scheduling page with Zoom's booking widget embedded. Using it shares your data with Zoom under its Privacy Policy.

See yFiles in action

30 min • Online • No install required


For developers, PMs & tech leads

Prefer another tool over Zoom? Just say so when you book.

Opens our scheduling page with Zoom's booking widget embedded. Using it shares your data with Zoom under its Privacy Policy.

Graph Settings

Wheel Behavior Modifiers
Wheel Zoom Factor
1.2
Wheel Scroll Factor
5
Demo

Mouse Wheel Customization

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