diff --git a/src/litegraph.d.ts b/src/litegraph.d.ts index c9fbe0ced..6629e779f 100644 --- a/src/litegraph.d.ts +++ b/src/litegraph.d.ts @@ -1142,6 +1142,8 @@ export declare class LGraphCanvas { allow_interaction: boolean; /** allows to change a connection with having to redo it again */ allow_reconnect_links: boolean; + /** allow selecting multi nodes without pressing extra keys */ + multi_select: boolean; /** No effect */ allow_searchbox: boolean; always_render_background: boolean; diff --git a/src/litegraph.js b/src/litegraph.js index 3f0afa0a9..c0242831e 100644 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -5202,6 +5202,7 @@ LGraphNode.prototype.executeAction = function(action) this.allow_dragcanvas = true; this.allow_dragnodes = true; this.allow_interaction = true; //allow to control widgets, buttons, collapse, etc + this.multi_select = false; //allow selecting multi nodes without pressing extra keys this.allow_searchbox = true; this.allow_reconnect_links = true; //allows to change a connection with having to redo it again this.align_to_grid = false; //snap to grid @@ -7279,7 +7280,7 @@ LGraphNode.prototype.executeAction = function(action) }; LGraphCanvas.prototype.processNodeSelected = function(node, e) { - this.selectNode(node, e && (e.shiftKey||e.ctrlKey)); + this.selectNode(node, e && (e.shiftKey || e.ctrlKey || this.multi_select)); if (this.onNodeSelected) { this.onNodeSelected(node); }