From b55a88de85f47ad7951fc6f7675dbcffa672f17e Mon Sep 17 00:00:00 2001 From: sefgit Date: Tue, 26 Dec 2023 09:17:02 +0700 Subject: [PATCH 1/2] toggle multiview toggle multiview back to singleview --- src/litegraph-editor.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/litegraph-editor.js b/src/litegraph-editor.js index d47ad6f42..3d25f5a3f 100755 --- a/src/litegraph-editor.js +++ b/src/litegraph-editor.js @@ -270,6 +270,19 @@ Editor.prototype.addMiniWindow = function(w, h) { Editor.prototype.addMultiview = function() { var canvas = this.canvas; + if (this.graphcanvas2) { + this.graphcanvas2.setGraph(null, true); + this.graphcanvas2.viewport = null; + this.graphcanvas2 = null; + this.graphcanvas.viewport = null; + this.graphcanvas.setGraph(null, true); + this.graphcanvas = null; + var graphcanvas = new LGraphCanvas( canvas, this.graph ); + graphcanvas.background_image = "imgs/grid.png"; + this.graphcanvas = graphcanvas; + window.graphcanvas = this.graphcanvas; + return; + } this.graphcanvas.ctx.fillStyle = "black"; this.graphcanvas.ctx.fillRect(0,0,canvas.width,canvas.height); this.graphcanvas.viewport = [0,0,canvas.width*0.5-2,canvas.height]; From d6cc61120cb36486e5669a428b9ec39351f1ae08 Mon Sep 17 00:00:00 2001 From: sefgit Date: Tue, 26 Dec 2023 09:53:01 +0700 Subject: [PATCH 2/2] show_info as global setting Add show_info as global setting --- src/litegraph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/litegraph.js b/src/litegraph.js index 2881c4901..c36a86176 100755 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -93,6 +93,7 @@ node_images_path: "", debug: false, + show_info: true, catch_exceptions: true, throw_errors: true, allow_scripts: false, //if set to true some nodes like Formula would be allowed to evaluate code that comes from unsafe sources (like node configuration), which could lead to exploits @@ -5269,7 +5270,7 @@ LGraphNode.prototype.executeAction = function(action) this.read_only = false; //if set to true users cannot modify the graph this.render_only_selected = true; this.live_mode = false; - this.show_info = true; + this.show_info = LiteGraph.show_info; this.allow_dragcanvas = true; this.allow_dragnodes = true; this.allow_interaction = true; //allow to control widgets, buttons, collapse, etc