mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Restore drag-to-detach action
This commit is contained in:
parent
eb53054f49
commit
94bc887369
@ -1798,6 +1798,21 @@ RED.view = (function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mousedown_node && mouse_mode == RED.state.JOINING) {
|
if (mousedown_node && mouse_mode == RED.state.JOINING) {
|
||||||
|
var removedLinks = [];
|
||||||
|
for (i=0;i<drag_lines.length;i++) {
|
||||||
|
if (drag_lines[i].link) {
|
||||||
|
removedLinks.push(drag_lines[i].link)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (removedLinks.length > 0) {
|
||||||
|
historyEvent = {
|
||||||
|
t:"delete",
|
||||||
|
links: removedLinks,
|
||||||
|
dirty:RED.nodes.dirty()
|
||||||
|
};
|
||||||
|
RED.history.push(historyEvent);
|
||||||
|
RED.nodes.dirty(true);
|
||||||
|
} else {
|
||||||
// Trigger quick add dialog
|
// Trigger quick add dialog
|
||||||
d3.event.stopPropagation();
|
d3.event.stopPropagation();
|
||||||
clearSelection();
|
clearSelection();
|
||||||
@ -1808,6 +1823,8 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
showQuickAddDialog({ position: point, group: clickedGroup });
|
showQuickAddDialog({ position: point, group: clickedGroup });
|
||||||
}
|
}
|
||||||
|
hideDragLines();
|
||||||
|
}
|
||||||
if (lasso) {
|
if (lasso) {
|
||||||
var x = parseInt(lasso.attr("x"));
|
var x = parseInt(lasso.attr("x"));
|
||||||
var y = parseInt(lasso.attr("y"));
|
var y = parseInt(lasso.attr("y"));
|
||||||
|
Loading…
Reference in New Issue
Block a user