mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 22:39:39 +00:00
Fix hook on undefined (#90)
This commit is contained in:
4
public/litegraph.d.ts
vendored
4
public/litegraph.d.ts
vendored
@@ -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;
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user