mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 22:59:14 +00:00
ctx.roundRect re-Apply modern way for [radius]
This commit is contained in:
@@ -7798,7 +7798,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
ctx.fillStyle = "#111";
|
||||
ctx.globalAlpha = 0.8;
|
||||
ctx.beginPath();
|
||||
ctx.roundRect(10, 10, w, (num + 1) * h + 50, 8);
|
||||
ctx.roundRect(10, 10, w, (num + 1) * h + 50, [8]);
|
||||
ctx.fill();
|
||||
ctx.globalAlpha = 1;
|
||||
|
||||
@@ -7867,7 +7867,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
ctx.fillStyle = "#111";
|
||||
ctx.globalAlpha = 0.8;
|
||||
ctx.beginPath();
|
||||
ctx.roundRect(canvas_w - w - 10, 10, w, (num + 1) * h + 50, 8);
|
||||
ctx.roundRect(canvas_w - w - 10, 10, w, (num + 1) * h + 50, [8]);
|
||||
ctx.fill();
|
||||
ctx.globalAlpha = 1;
|
||||
|
||||
@@ -7945,7 +7945,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
if(clicked)
|
||||
ctx.fillStyle = "#AAA";
|
||||
ctx.beginPath();
|
||||
ctx.roundRect(x,y,w,h,4 );
|
||||
ctx.roundRect(x,y,w,h,[4] );
|
||||
ctx.fill();
|
||||
|
||||
if(text != null)
|
||||
@@ -8659,7 +8659,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
ctx.shadowBlur = 3;
|
||||
ctx.fillStyle = "#454";
|
||||
ctx.beginPath();
|
||||
ctx.roundRect( pos[0] - w*0.5, pos[1] - 15 - h, w, h,3, 3);
|
||||
ctx.roundRect( pos[0] - w*0.5, pos[1] - 15 - h, w, h, [3]);
|
||||
ctx.moveTo( pos[0] - 10, pos[1] - 15 );
|
||||
ctx.lineTo( pos[0] + 10, pos[1] - 15 );
|
||||
ctx.lineTo( pos[0], pos[1] - 5 );
|
||||
@@ -8728,8 +8728,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
area[1],
|
||||
area[2],
|
||||
area[3],
|
||||
this.round_radius,
|
||||
shape == LiteGraph.CARD_SHAPE ? 0 : this.round_radius
|
||||
shape == LiteGraph.CARD_SHAPE ? [this.round_radius,this.round_radius,0,0] : [this.round_radius]
|
||||
);
|
||||
} else if (shape == LiteGraph.CIRCLE_SHAPE) {
|
||||
ctx.arc(
|
||||
@@ -8794,8 +8793,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
-title_height,
|
||||
size[0] + 1,
|
||||
title_height,
|
||||
this.round_radius,
|
||||
node.flags.collapsed ? this.round_radius : 0
|
||||
node.flags.collapsed ? [this.round_radius] : [this.round_radius,this.round_radius,0,0]
|
||||
);
|
||||
}
|
||||
ctx.fill();
|
||||
@@ -8922,7 +8920,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
else
|
||||
{
|
||||
ctx.beginPath();
|
||||
ctx.roundRect(x+2, -w+2, w-4, w-4,4);
|
||||
ctx.roundRect(x+2, -w+2, w-4, w-4,[4]);
|
||||
ctx.fill();
|
||||
}
|
||||
ctx.fillStyle = "#333";
|
||||
@@ -8968,7 +8966,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
-6 + area[1],
|
||||
12 + area[2],
|
||||
12 + area[3],
|
||||
this.round_radius * 2
|
||||
[this.round_radius * 2]
|
||||
);
|
||||
} else if (shape == LiteGraph.CARD_SHAPE) {
|
||||
ctx.roundRect(
|
||||
@@ -8976,8 +8974,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
-6 + area[1],
|
||||
12 + area[2],
|
||||
12 + area[3],
|
||||
this.round_radius * 2,
|
||||
2
|
||||
[this.round_radius * 2,2,this.round_radius * 2,2]
|
||||
);
|
||||
} else if (shape == LiteGraph.CIRCLE_SHAPE) {
|
||||
ctx.arc(
|
||||
@@ -9571,7 +9568,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
ctx.fillStyle = background_color;
|
||||
ctx.beginPath();
|
||||
if (show_text)
|
||||
ctx.roundRect(margin, posY, widget_width - margin * 2, H, H * 0.5);
|
||||
ctx.roundRect(margin, posY, widget_width - margin * 2, H, [H * 0.5]);
|
||||
else
|
||||
ctx.rect(margin, posY, widget_width - margin * 2, H );
|
||||
ctx.fill();
|
||||
@@ -9628,7 +9625,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
ctx.fillStyle = background_color;
|
||||
ctx.beginPath();
|
||||
if(show_text)
|
||||
ctx.roundRect(margin, posY, widget_width - margin * 2, H, H * 0.5);
|
||||
ctx.roundRect(margin, posY, widget_width - margin * 2, H, [H * 0.5] );
|
||||
else
|
||||
ctx.rect(margin, posY, widget_width - margin * 2, H );
|
||||
ctx.fill();
|
||||
@@ -9688,7 +9685,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
ctx.fillStyle = background_color;
|
||||
ctx.beginPath();
|
||||
if (show_text)
|
||||
ctx.roundRect(margin, posY, widget_width - margin * 2, H, H * 0.5);
|
||||
ctx.roundRect(margin, posY, widget_width - margin * 2, H, [H * 0.5]);
|
||||
else
|
||||
ctx.rect( margin, posY, widget_width - margin * 2, H );
|
||||
ctx.fill();
|
||||
|
||||
Reference in New Issue
Block a user