mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 09:45:13 +00:00
fixed bug in getInputNode
This commit is contained in:
@@ -463,7 +463,7 @@ function MathOperation()
|
||||
this.addOutput("=","number");
|
||||
this.addProperty( "A", 1 );
|
||||
this.addProperty( "B", 1 );
|
||||
this.addProperty( "OP", "+", "string", { values: MathOperation.values } );
|
||||
this.addProperty( "OP", "+", "enum", { values: MathOperation.values } );
|
||||
}
|
||||
|
||||
MathOperation.values = ["+","-","*","/","%","^"];
|
||||
@@ -472,6 +472,10 @@ MathOperation.title = "Operation";
|
||||
MathOperation.desc = "Easy math operators";
|
||||
MathOperation["@OP"] = { type:"enum", title: "operation", values: MathOperation.values };
|
||||
|
||||
MathOperation.prototype.getTitle = function()
|
||||
{
|
||||
return "A " + this.properties.OP + " B";
|
||||
}
|
||||
|
||||
MathOperation.prototype.setValue = function(v)
|
||||
{
|
||||
@@ -516,9 +520,9 @@ MathOperation.prototype.onDrawBackground = function(ctx)
|
||||
return;
|
||||
|
||||
ctx.font = "40px Arial";
|
||||
ctx.fillStyle = "black";
|
||||
ctx.fillStyle = "#CCC";
|
||||
ctx.textAlign = "center";
|
||||
ctx.fillText(this.properties.OP, this.size[0] * 0.5, this.size[1] * 0.5 + LiteGraph.NODE_TITLE_HEIGHT );
|
||||
ctx.fillText(this.properties.OP, this.size[0] * 0.5, this.size[1] * 0.35 + LiteGraph.NODE_TITLE_HEIGHT );
|
||||
ctx.textAlign = "left";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user