mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-06 16:10:09 +00:00
chore: build
This commit is contained in:
@@ -2909,7 +2909,7 @@ LGraphNode.prototype.getSlotInPosition = function( x, y )
|
||||
var input = this.inputs[i];
|
||||
this.getConnectionPos( true,i, link_pos );
|
||||
if( isInsideRectangle(x, y, link_pos[0] - 10, link_pos[1] - 5, 20,10) )
|
||||
return { input: input, slot: i, link_pos: link_pos, locked: input.locked };
|
||||
return { input: input, slot: i, link_pos: link_pos };
|
||||
}
|
||||
|
||||
if(this.outputs)
|
||||
@@ -2918,7 +2918,7 @@ LGraphNode.prototype.getSlotInPosition = function( x, y )
|
||||
var output = this.outputs[i];
|
||||
this.getConnectionPos(false,i,link_pos);
|
||||
if( isInsideRectangle(x, y, link_pos[0] - 10, link_pos[1] - 5, 20,10) )
|
||||
return { output: output, slot: i, link_pos: link_pos, locked: output.locked };
|
||||
return { output: output, slot: i, link_pos: link_pos };
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -8246,8 +8246,9 @@ LGraphCanvas.prototype.processContextMenu = function( node, event )
|
||||
menu_info = [];
|
||||
if(slot && slot.output && slot.output.links && slot.output.links.length)
|
||||
menu_info.push( { content: "Disconnect Links", slot: slot } );
|
||||
menu_info.push( slot.locked ? "Cannot remove" : { content: "Remove Slot", slot: slot } );
|
||||
menu_info.push( slot.nameLocked ? "Cannot rename" : { content: "Rename Slot", slot: slot } );
|
||||
const _slot = slot.input || slot.output
|
||||
menu_info.push( _slot.locked ? "Cannot remove" : { content: "Remove Slot", slot: slot } );
|
||||
menu_info.push( _slot.nameLocked ? "Cannot rename" : { content: "Rename Slot", slot: slot } );
|
||||
options.title = (slot.input ? slot.input.type : slot.output.type) || "*";
|
||||
if(slot.input && slot.input.type == LiteGraph.ACTION)
|
||||
options.title = "Action";
|
||||
|
||||
8
build/litegraph.min.js
vendored
8
build/litegraph.min.js
vendored
@@ -1591,14 +1591,14 @@ $jscomp.polyfill("Array.prototype.keys", function(w) {
|
||||
var g = this.inputs[c];
|
||||
this.getConnectionPos(!0, c, d);
|
||||
if (B(a, b, d[0] - 10, d[1] - 5, 20, 10)) {
|
||||
return {input:g, slot:c, link_pos:d, locked:g.locked};
|
||||
return {input:g, slot:c, link_pos:d};
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.outputs) {
|
||||
for (c = 0, m = this.outputs.length; c < m; ++c) {
|
||||
if (g = this.outputs[c], this.getConnectionPos(!1, c, d), B(a, b, d[0] - 10, d[1] - 5, 20, 10)) {
|
||||
return {output:g, slot:c, link_pos:d, locked:g.locked};
|
||||
return {output:g, slot:c, link_pos:d};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4011,8 +4011,8 @@ $jscomp.polyfill("Array.prototype.keys", function(w) {
|
||||
}
|
||||
}, extra:a}, h = null;
|
||||
a && (h = a.getSlotInPosition(b.canvasX, b.canvasY), f.active_node = a);
|
||||
h ? (e = [], h && h.output && h.output.links && h.output.links.length && e.push({content:"Disconnect Links", slot:h}), e.push(h.locked ? "Cannot remove" : {content:"Remove Slot", slot:h}), e.push(h.nameLocked ? "Cannot rename" : {content:"Rename Slot", slot:h}), l.title = (h.input ? h.input.type : h.output.type) || "*", h.input && h.input.type == c.ACTION && (l.title = "Action"), h.output && h.output.type == c.EVENT && (l.title = "Event")) : a ? e = this.getNodeMenuOptions(a) : (e = this.getCanvasMenuOptions(),
|
||||
(b = this.graph.getGroupOnPos(b.canvasX, b.canvasY)) && e.push(null, {content:"Edit Group", has_submenu:!0, submenu:{title:"Group", extra:b, options:this.getGroupMenuOptions(b)}}));
|
||||
h ? (e = [], h && h.output && h.output.links && h.output.links.length && e.push({content:"Disconnect Links", slot:h}), b = h.input || h.output, e.push(b.locked ? "Cannot remove" : {content:"Remove Slot", slot:h}), e.push(b.nameLocked ? "Cannot rename" : {content:"Rename Slot", slot:h}), l.title = (h.input ? h.input.type : h.output.type) || "*", h.input && h.input.type == c.ACTION && (l.title = "Action"), h.output && h.output.type == c.EVENT && (l.title = "Event")) : a ? e = this.getNodeMenuOptions(a) :
|
||||
(e = this.getCanvasMenuOptions(), (h = this.graph.getGroupOnPos(b.canvasX, b.canvasY)) && e.push(null, {content:"Edit Group", has_submenu:!0, submenu:{title:"Group", extra:h, options:this.getGroupMenuOptions(h)}}));
|
||||
e && new c.ContextMenu(e, l, g);
|
||||
};
|
||||
this.CanvasRenderingContext2D && (CanvasRenderingContext2D.prototype.roundRect = function(a, b, d, g, c, e) {
|
||||
|
||||
Reference in New Issue
Block a user