rete icon indicating copy to clipboard operation
rete copied to clipboard

Unselecting node

Open magallardo opened this issue 4 years ago • 1 comments

Hello,

What is the best way to unselect a node without having to select another node?

I would like to click on the canvas and unselect the last selected node. Currently, you can only unselect a node by selecting another node. Thus, you can never have all nodes unselected after one is selected.

Thanks, Marcelo

magallardo avatar Feb 05 '21 17:02 magallardo

You can register a click event (Documentation) on the editor and clear the list of selected nodes within it like so

editor.on(["click"], () => { editor.selected.list = [] });

Not sure if there is a better way to do it but this works for me.

gilengel avatar Mar 21 '21 09:03 gilengel

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

rete-js[bot] avatar Jul 13 '23 10:07 rete-js[bot]