rete icon indicating copy to clipboard operation
rete copied to clipboard

Unselect node, if clicked on editor

Open flobiber opened this issue 7 years ago • 5 comments

Is it possible to unselect a node if i like on the editor where no other node is places?

flobiber avatar May 17 '19 17:05 flobiber

On the user side, no. In which case do you need it?

Ni55aN avatar May 17 '19 20:05 Ni55aN

Our UX-Requirements specify that behavior.

flobiber avatar May 19 '19 17:05 flobiber

For example:

editor.on('click', () => {
    editor.selected.clear();
    editor.nodes.map(n => n.update())
});

Ni55aN avatar May 19 '19 20:05 Ni55aN

Works like a charm!

flobiber avatar May 19 '19 21:05 flobiber

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; });

hpietukhin avatar May 24 '24 12:05 hpietukhin