Browse Source

Update litegraph.core.js

add node.ondrawn hook, allow canvas.onSelectionChange hook
pull/2090/head
someghuser 12 months ago committed by GitHub
parent
commit
a8266b8515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      web/lib/litegraph.core.js

4
web/lib/litegraph.core.js

@ -5304,7 +5304,6 @@ LGraphNode.prototype.executeAction = function(action)
this.onDrawOverlay = null; //to render foreground objects not affected by transform (for GUIs) this.onDrawOverlay = null; //to render foreground objects not affected by transform (for GUIs)
this.onDrawLinkTooltip = null; //called when rendering a tooltip this.onDrawLinkTooltip = null; //called when rendering a tooltip
this.onNodeMoved = null; //called after moving a node this.onNodeMoved = null; //called after moving a node
this.onSelectionChange = null; //called if the selection changes
this.onConnectingChange = null; //called before any link changes this.onConnectingChange = null; //called before any link changes
this.onBeforeChange = null; //called before modifying the graph this.onBeforeChange = null; //called before modifying the graph
this.onAfterChange = null; //called after modifying the graph this.onAfterChange = null; //called after modifying the graph
@ -8840,6 +8839,9 @@ LGraphNode.prototype.executeAction = function(action)
} }
ctx.globalAlpha = 1.0; ctx.globalAlpha = 1.0;
if (node.onDrawn)
node.onDrawn();
}; };
//used by this.over_link_center //used by this.over_link_center

Loading…
Cancel
Save