mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix wiring nodes from input back to output
This commit is contained in:
parent
4469a334fd
commit
e2c86c4b96
@ -2280,7 +2280,7 @@ RED.view = (function() {
|
||||
}
|
||||
|
||||
function portMouseDown(d,portType,portIndex, evt) {
|
||||
if (RED.view.DEBUG) { console.warn("portMouseDown", mouse_mode,d); }
|
||||
if (RED.view.DEBUG) { console.warn("portMouseDown", mouse_mode,d,portType,portIndex); }
|
||||
evt = evt || d3.event;
|
||||
if (evt === 1) {
|
||||
return;
|
||||
@ -2306,7 +2306,7 @@ RED.view = (function() {
|
||||
}
|
||||
|
||||
function portMouseUp(d,portType,portIndex,evt) {
|
||||
if (RED.view.DEBUG) { console.warn("portMouseUp", mouse_mode,d); }
|
||||
if (RED.view.DEBUG) { console.warn("portMouseUp", mouse_mode,d,portType,portIndex); }
|
||||
evt = evt || d3.event;
|
||||
if (mouse_mode === RED.state.SELECTING_NODE) {
|
||||
evt.stopPropagation();
|
||||
@ -2712,6 +2712,12 @@ RED.view = (function() {
|
||||
} else if (d.type === 'link out') {
|
||||
direction = 0;
|
||||
}
|
||||
} else {
|
||||
if (drag_lines[0].portType === 1) {
|
||||
direction = PORT_TYPE_OUTPUT;
|
||||
} else {
|
||||
direction = PORT_TYPE_INPUT;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3025,7 +3031,7 @@ RED.view = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
function portMouseDownProxy(e) { portMouseDown(this.__data__,this.__portType__,this.__portIndex__, e); }
|
||||
function portMouseDownProxy(e) { portMouseDown(this.__data__,this.__portType__,this.__portIndex__, e); }
|
||||
function portTouchStartProxy(e) { portMouseDown(this.__data__,this.__portType__,this.__portIndex__, e); e.preventDefault() }
|
||||
function portMouseUpProxy(e) { portMouseUp(this.__data__,this.__portType__,this.__portIndex__, e); }
|
||||
function portTouchEndProxy(e) { portMouseUp(this.__data__,this.__portType__,this.__portIndex__, e); e.preventDefault() }
|
||||
@ -3852,7 +3858,7 @@ RED.view = (function() {
|
||||
portPort.addEventListener("mousedown", portMouseDownProxy);
|
||||
portPort.addEventListener("touchstart", portTouchStartProxy);
|
||||
portPort.addEventListener("mouseup", portMouseUpProxy);
|
||||
portPort.addEventListener("touchstart", portTouchEndProxy);
|
||||
portPort.addEventListener("touchend", portTouchEndProxy);
|
||||
portPort.addEventListener("mouseover", portMouseOverProxy);
|
||||
portPort.addEventListener("mouseout", portMouseOutProxy);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user