mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
3b9065b057
commit
d9900d8e4c
@ -1678,7 +1678,7 @@ RED.view = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
if (ns.length > 0) {
|
||||
if (ns.length > 0 && mouse_mode == RED.state.MOVING_ACTIVE) {
|
||||
historyEvent = {t:"move",nodes:ns,dirty:RED.nodes.dirty()};
|
||||
if (activeSpliceLink) {
|
||||
// TODO: DRY - droppable/nodeMouseDown/canvasMouseUp
|
||||
@ -2354,6 +2354,10 @@ RED.view = (function() {
|
||||
mousedown_port_type = null;
|
||||
activeSpliceLink = null;
|
||||
spliceActive = false;
|
||||
if (activeHoverGroup) {
|
||||
activeHoverGroup.hovered = false;
|
||||
activeHoverGroup = null;
|
||||
}
|
||||
d3.select(".red-ui-flow-link-splice").classed("red-ui-flow-link-splice",false);
|
||||
if (spliceTimer) {
|
||||
clearTimeout(spliceTimer);
|
||||
@ -2869,7 +2873,7 @@ RED.view = (function() {
|
||||
//RED.touch.radialMenu.show(d3.select(this),pos);
|
||||
if (mouse_mode == RED.state.IMPORT_DRAGGING) {
|
||||
RED.keyboard.remove("escape");
|
||||
|
||||
var historyEvent = RED.history.peek();
|
||||
if (activeSpliceLink) {
|
||||
// TODO: DRY - droppable/nodeMouseDown/canvasMouseUp
|
||||
var spliceLink = d3.select(activeSpliceLink).data()[0];
|
||||
@ -2886,12 +2890,27 @@ RED.view = (function() {
|
||||
};
|
||||
RED.nodes.addLink(link1);
|
||||
RED.nodes.addLink(link2);
|
||||
var historyEvent = RED.history.peek();
|
||||
|
||||
historyEvent.links = [link1,link2];
|
||||
historyEvent.removedLinks = [spliceLink];
|
||||
updateActiveNodes();
|
||||
}
|
||||
|
||||
if (activeHoverGroup) {
|
||||
for (var j=0;j<movingSet.length();j++) {
|
||||
var n = movingSet.get(j);
|
||||
RED.group.addToGroup(activeHoverGroup,n.n);
|
||||
}
|
||||
historyEvent.addedToGroup = activeHoverGroup;
|
||||
|
||||
activeHoverGroup.hovered = false;
|
||||
enterActiveGroup(activeHoverGroup)
|
||||
// TODO: check back whether this should add to moving_set
|
||||
activeGroup.selected = true;
|
||||
activeHoverGroup = null;
|
||||
}
|
||||
|
||||
|
||||
updateSelection();
|
||||
RED.nodes.dirty(true);
|
||||
redraw();
|
||||
|
Loading…
Reference in New Issue
Block a user