fixed mouse function for custom widget : take custom height into account

This commit is contained in:
altarfinch
2020-05-08 01:40:15 +02:00
parent 7ba41d1d75
commit 4fe32687d2
4 changed files with 941 additions and 939 deletions

5
src/litegraph.d.ts vendored
View File

@@ -62,17 +62,16 @@ export interface IWidget<TValue = any, TOptions = any> {
width: number,
posY: number,
height: number
): number | undefined;
): void;
/**
* Called by `LGraphCanvas.processNodeWidgets`
* https://github.com/jagenjo/litegraph.js/issues/76
*/
mouse?(
ctx: undefined,
event: MouseEvent,
pos: Vector2,
node: LGraphNode
): void;
): boolean;
/** Called by `LGraphNode.computeSize` */
computeSize?(width: number): [number, number];
}