Merge pull request #197 from Kidoncio/ts_on_property_changed

TS support about LGraphNode.onPropertyChanged
This commit is contained in:
Javi Agenjo
2021-01-29 10:50:27 +01:00
committed by GitHub

9
src/litegraph.d.ts vendored
View File

@@ -1005,6 +1005,15 @@ export declare class LGraphNode {
ioSlot: (INodeOutputSlot | INodeInputSlot)
): void;
/**
* if returns false, will abort the `LGraphNode.setProperty`
* Called when a property is changed
* @param property
* @param value
* @param prevValue
*/
onPropertyChanged?(property: string, value: any, prevValue: any): void | boolean;
/** Called by `LGraphCanvas.processContextMenu` */
getMenuOptions?(graphCanvas: LGraphCanvas): ContextMenuItem[];
getSlotMenuOptions?(slot: INodeSlot): ContextMenuItem[];