From 9853fc2958173e024037ad41d9e7341b310bc924 Mon Sep 17 00:00:00 2001 From: tamat Date: Wed, 10 Nov 2021 11:55:31 +0100 Subject: [PATCH] fixes --- build/litegraph.js | 14 +++++++++----- build/litegraph_mini.js | 14 +++++++++----- src/litegraph.js | 12 ++++++++---- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/build/litegraph.js b/build/litegraph.js index 2abada2a5..c371491e4 100644 --- a/build/litegraph.js +++ b/build/litegraph.js @@ -138,7 +138,7 @@ release_link_on_empty_shows_menu: false, //[true!] dragging a link to empty space will open a menu, add from list, search or defaults - pointerevents_method: "pointer", // "mouse"|"pointer" use mouse for retrocompatibility issues? (none found @ now) + pointerevents_method: "mouse", // "mouse"|"pointer" use mouse for retrocompatibility issues? (none found @ now) // TODO implement pointercancel, gotpointercapture, lostpointercapture, (pointerover, pointerout if necessary) /** @@ -7757,6 +7757,13 @@ LGraphNode.prototype.executeAction = function(action) var connType = connInOrOut.type; var connDir = connInOrOut.dir; + if(connDir == null) + { + if (this.connecting_output) + connDir = this.connecting_node.horizontal ? LiteGraph.DOWN : LiteGraph.RIGHT; + else + connDir = this.connecting_node.horizontal ? LiteGraph.UP : LiteGraph.LEFT; + } var connShape = connInOrOut.shape; switch (connType) { @@ -7776,10 +7783,7 @@ LGraphNode.prototype.executeAction = function(action) false, null, link_color, - connDir || - (this.connecting_node.horizontal - ? LiteGraph.DOWN - : LiteGraph.RIGHT), + connDir, LiteGraph.CENTER ); diff --git a/build/litegraph_mini.js b/build/litegraph_mini.js index c84639163..e2fc8b523 100644 --- a/build/litegraph_mini.js +++ b/build/litegraph_mini.js @@ -138,7 +138,7 @@ release_link_on_empty_shows_menu: false, //[true!] dragging a link to empty space will open a menu, add from list, search or defaults - pointerevents_method: "pointer", // "mouse"|"pointer" use mouse for retrocompatibility issues? (none found @ now) + pointerevents_method: "mouse", // "mouse"|"pointer" use mouse for retrocompatibility issues? (none found @ now) // TODO implement pointercancel, gotpointercapture, lostpointercapture, (pointerover, pointerout if necessary) /** @@ -7757,6 +7757,13 @@ LGraphNode.prototype.executeAction = function(action) var connType = connInOrOut.type; var connDir = connInOrOut.dir; + if(connDir == null) + { + if (this.connecting_output) + connDir = this.connecting_node.horizontal ? LiteGraph.DOWN : LiteGraph.RIGHT; + else + connDir = this.connecting_node.horizontal ? LiteGraph.UP : LiteGraph.LEFT; + } var connShape = connInOrOut.shape; switch (connType) { @@ -7776,10 +7783,7 @@ LGraphNode.prototype.executeAction = function(action) false, null, link_color, - connDir || - (this.connecting_node.horizontal - ? LiteGraph.DOWN - : LiteGraph.RIGHT), + connDir, LiteGraph.CENTER ); diff --git a/src/litegraph.js b/src/litegraph.js index 09fd1632f..8591ed114 100644 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -7755,6 +7755,13 @@ LGraphNode.prototype.executeAction = function(action) var connType = connInOrOut.type; var connDir = connInOrOut.dir; + if(connDir == null) + { + if (this.connecting_output) + connDir = this.connecting_node.horizontal ? LiteGraph.DOWN : LiteGraph.RIGHT; + else + connDir = this.connecting_node.horizontal ? LiteGraph.UP : LiteGraph.LEFT; + } var connShape = connInOrOut.shape; switch (connType) { @@ -7774,10 +7781,7 @@ LGraphNode.prototype.executeAction = function(action) false, null, link_color, - connDir || - (this.connecting_node.horizontal - ? LiteGraph.DOWN - : LiteGraph.RIGHT), + connDir, LiteGraph.CENTER );