mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 18:22:40 +00:00
added clear_background_color to clear, prior it was using the css bg color of the container
This commit is contained in:
@@ -5198,6 +5198,7 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
this.editor_alpha = 1; //used for transition
|
this.editor_alpha = 1; //used for transition
|
||||||
this.pause_rendering = false;
|
this.pause_rendering = false;
|
||||||
this.clear_background = true;
|
this.clear_background = true;
|
||||||
|
this.clear_background_color = "#222";
|
||||||
|
|
||||||
this.read_only = false; //if set to true users cannot modify the graph
|
this.read_only = false; //if set to true users cannot modify the graph
|
||||||
this.render_only_selected = true;
|
this.render_only_selected = true;
|
||||||
@@ -8235,6 +8236,17 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
this.ds.toCanvasContext(ctx);
|
this.ds.toCanvasContext(ctx);
|
||||||
|
|
||||||
//render BG
|
//render BG
|
||||||
|
if ( this.ds.scale < 1.5 && !bg_already_painted && this.clear_background_color )
|
||||||
|
{
|
||||||
|
ctx.fillStyle = this.clear_background_color;
|
||||||
|
ctx.fillRect(
|
||||||
|
this.visible_area[0],
|
||||||
|
this.visible_area[1],
|
||||||
|
this.visible_area[2],
|
||||||
|
this.visible_area[3]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.background_image &&
|
this.background_image &&
|
||||||
this.ds.scale > 0.5 &&
|
this.ds.scale > 0.5 &&
|
||||||
|
|||||||
Reference in New Issue
Block a user