rete
rete copied to clipboard
Unselect node, if clicked on editor
Is it possible to unselect a node if i like on the editor where no other node is places?
On the user side, no. In which case do you need it?
Our UX-Requirements specify that behavior.
For example:
editor.on('click', () => {
editor.selected.clear();
editor.nodes.map(n => n.update())
});
Works like a charm!
Is there is a way to do this in rete v2?
just got it:
this.area.addPipe((c: { type: string; }) => {
if (c.type === 'pointerdown') {
unselectAll(graph);
}
return c;
});