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]; 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