1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Show quick-add dialog when draggin wire to empty space

This commit is contained in:
Nick O'Leary 2023-03-03 15:52:59 +00:00
parent d1094da6c7
commit 3fbfd47089
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -1894,7 +1894,18 @@ RED.view = (function() {
};
RED.history.push(historyEvent);
RED.nodes.dirty(true);
} else {
// Trigger quick add dialog
d3.event.stopPropagation();
clearSelection();
const point = d3.mouse(this);
var clickedGroup = getGroupAt(point[0], point[1]);
if (drag_lines.length > 0) {
clickedGroup = clickedGroup || RED.nodes.group(drag_lines[0].node.g)
}
showQuickAddDialog({ position: point, group: clickedGroup });
}
hideDragLines();
}
if (lasso) {