Skip to content

Commit 9853fc2

Browse files
author
tamat
committed
fixes
1 parent 07ee12d commit 9853fc2

3 files changed

Lines changed: 26 additions & 14 deletions

File tree

build/litegraph.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138

139139
release_link_on_empty_shows_menu: false, //[true!] dragging a link to empty space will open a menu, add from list, search or defaults
140140

141-
pointerevents_method: "pointer", // "mouse"|"pointer" use mouse for retrocompatibility issues? (none found @ now)
141+
pointerevents_method: "mouse", // "mouse"|"pointer" use mouse for retrocompatibility issues? (none found @ now)
142142
// TODO implement pointercancel, gotpointercapture, lostpointercapture, (pointerover, pointerout if necessary)
143143

144144
/**
@@ -7757,6 +7757,13 @@ LGraphNode.prototype.executeAction = function(action)
77577757

77587758
var connType = connInOrOut.type;
77597759
var connDir = connInOrOut.dir;
7760+
if(connDir == null)
7761+
{
7762+
if (this.connecting_output)
7763+
connDir = this.connecting_node.horizontal ? LiteGraph.DOWN : LiteGraph.RIGHT;
7764+
else
7765+
connDir = this.connecting_node.horizontal ? LiteGraph.UP : LiteGraph.LEFT;
7766+
}
77607767
var connShape = connInOrOut.shape;
77617768

77627769
switch (connType) {
@@ -7776,10 +7783,7 @@ LGraphNode.prototype.executeAction = function(action)
77767783
false,
77777784
null,
77787785
link_color,
7779-
connDir ||
7780-
(this.connecting_node.horizontal
7781-
? LiteGraph.DOWN
7782-
: LiteGraph.RIGHT),
7786+
connDir,
77837787
LiteGraph.CENTER
77847788
);
77857789

build/litegraph_mini.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138

139139
release_link_on_empty_shows_menu: false, //[true!] dragging a link to empty space will open a menu, add from list, search or defaults
140140

141-
pointerevents_method: "pointer", // "mouse"|"pointer" use mouse for retrocompatibility issues? (none found @ now)
141+
pointerevents_method: "mouse", // "mouse"|"pointer" use mouse for retrocompatibility issues? (none found @ now)
142142
// TODO implement pointercancel, gotpointercapture, lostpointercapture, (pointerover, pointerout if necessary)
143143

144144
/**
@@ -7757,6 +7757,13 @@ LGraphNode.prototype.executeAction = function(action)
77577757

77587758
var connType = connInOrOut.type;
77597759
var connDir = connInOrOut.dir;
7760+
if(connDir == null)
7761+
{
7762+
if (this.connecting_output)
7763+
connDir = this.connecting_node.horizontal ? LiteGraph.DOWN : LiteGraph.RIGHT;
7764+
else
7765+
connDir = this.connecting_node.horizontal ? LiteGraph.UP : LiteGraph.LEFT;
7766+
}
77607767
var connShape = connInOrOut.shape;
77617768

77627769
switch (connType) {
@@ -7776,10 +7783,7 @@ LGraphNode.prototype.executeAction = function(action)
77767783
false,
77777784
null,
77787785
link_color,
7779-
connDir ||
7780-
(this.connecting_node.horizontal
7781-
? LiteGraph.DOWN
7782-
: LiteGraph.RIGHT),
7786+
connDir,
77837787
LiteGraph.CENTER
77847788
);
77857789

src/litegraph.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7755,6 +7755,13 @@ LGraphNode.prototype.executeAction = function(action)
77557755

77567756
var connType = connInOrOut.type;
77577757
var connDir = connInOrOut.dir;
7758+
if(connDir == null)
7759+
{
7760+
if (this.connecting_output)
7761+
connDir = this.connecting_node.horizontal ? LiteGraph.DOWN : LiteGraph.RIGHT;
7762+
else
7763+
connDir = this.connecting_node.horizontal ? LiteGraph.UP : LiteGraph.LEFT;
7764+
}
77587765
var connShape = connInOrOut.shape;
77597766

77607767
switch (connType) {
@@ -7774,10 +7781,7 @@ LGraphNode.prototype.executeAction = function(action)
77747781
false,
77757782
null,
77767783
link_color,
7777-
connDir ||
7778-
(this.connecting_node.horizontal
7779-
? LiteGraph.DOWN
7780-
: LiteGraph.RIGHT),
7784+
connDir,
77817785
LiteGraph.CENTER
77827786
);
77837787

0 commit comments

Comments
 (0)