Implement NumberWidget (#481)

This commit is contained in:
Chenlei Hu
2025-02-08 15:45:23 -05:00
committed by GitHub
parent c781053bd2
commit 63f9f30eec
4 changed files with 205 additions and 127 deletions

View File

@@ -83,11 +83,20 @@ export abstract class BaseWidget implements IBaseWidget {
* Handles the click event for the widget
* @param options - The options for handling the click event
*/
abstract onClick(options: {
onClick(options: {
e: CanvasMouseEvent
node: LGraphNode
canvas: LGraphCanvas
}): void
}): void {}
/**
* Handles the drag event for the widget
* @param options - The options for handling the drag event
*/
onDrag(options: {
e: CanvasMouseEvent
node: LGraphNode
}): void {}
/**
* Sets the value of the widget