Marquee Rectangle Node Creation Demo
This demo shows how to use
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
and relaying the size and location of the marquee rectangle to a
, which provides a visualisation as well as a
to which the marquee rectangle can be snapped to. The
used for default node creation is reused in the marquee's template to style the selection
Things to Try
Drag the mouse to span a rectangular selection that transforms into a node on release.