Skip to content

Commit

Permalink
Fix not title click cond (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Aug 27, 2024
1 parent 540519c commit 48613a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/litegraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -6074,7 +6074,9 @@ LGraphNode.prototype.executeAction = function(action)
//double clicking
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) {
// Note: pos[1] is the y-coordinate of the node's body
// If clicking on node header (title), pos[1] is negative
if (pos[1] < 0) {
if (node.onNodeTitleDblClick) {
node.onNodeTitleDblClick(e, pos, this);
}
Expand Down

0 comments on commit 48613a3

Please sign in to comment.