chevron_right Demos chevron_right Marquee Node Creation
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

Marquee Rectangle Node Creation Demo

This demo shows how to use MarqueeSelectionInputMode to create new nodes.

This is done by adding a listener that creates a node the size of the marquee rectangle when a selection is finished.

Also note that the marquee rectangle snaps to other nodes. This is achieved by using a custom MarqueeSelectionInputMode and relaying the size and location of the marquee rectangle to a SnapContext, which provides a visualization as well as a SnapResult to which the marquee rectangle can be snapped to. The INodeStyle used for default node creation is reused in the marquee's template to style the selection rectangle.

Things to Try

Drag the mouse to span a rectangular selection that transforms into a node on release.