diff --git a/public/litegraph.d.ts b/public/litegraph.d.ts index bd2fb717..fefd89e0 100644 --- a/public/litegraph.d.ts +++ b/public/litegraph.d.ts @@ -1007,14 +1007,14 @@ export declare class LGraphNode { ): void; onInputDblClick?( + slot: number, event: MouseEvent, - pos: Vector2, graphCanvas: LGraphCanvas ): void; onOutputDblClick?( + slot: number, event: MouseEvent, - pos: Vector2, graphCanvas: LGraphCanvas ): void; diff --git a/src/litegraph.js b/src/litegraph.js index 09895522..4fd957ed 100755 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -6075,7 +6075,9 @@ LGraphNode.prototype.executeAction = function(action) if (this.allow_interaction && is_double_click && this.selected_nodes[node.id]) { //check if it's a double click on the title bar if (pos[1] < LiteGraph.NODE_TITLE_HEIGHT) { - node?.onNodeTitleDblClick(e, pos, this); + if (node.onNodeTitleDblClick) { + node.onNodeTitleDblClick(e, pos, this); + } } //double click node if (node.onDblClick) {