chevron_right Demos chevron_right Native Listeners
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
Decorator Clicked

Native Listeners

This demo illustrates an approach on how to register native event listeners to SVG-elements on a style.

In this case a style decorator adds a circle with a click listener to the style. Please note that the yFiles input modes don't know anything about the native events you registered. Therefore, the input modes also handle the input. This can cause unwanted behavior, like selecting the node despite the native click listener being triggered.

To prevent input modes from being triggered as well, a pointerDown listener that calls preventDefault() on the event may be registered at the element as well.

See the sources for details.