mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-24 08:44:06 +00:00
[BugFix] Trigger IWidget.callback on widget drag (#514)
This commit is contained in:
@@ -146,8 +146,9 @@ export class NumberWidget extends BaseWidget implements INumericWidget {
|
||||
override onDrag(options: {
|
||||
e: CanvasMouseEvent
|
||||
node: LGraphNode
|
||||
canvas: LGraphCanvas
|
||||
}) {
|
||||
const { e, node } = options
|
||||
const { e, node, canvas } = options
|
||||
const width = this.width || node.width
|
||||
const x = e.canvasX - node.pos[0]
|
||||
const delta = x < 40
|
||||
@@ -168,9 +169,7 @@ export class NumberWidget extends BaseWidget implements INumericWidget {
|
||||
newValue = this.options.max
|
||||
}
|
||||
if (newValue !== this.value) {
|
||||
this.value = newValue
|
||||
return true
|
||||
this.setValue(newValue, { e, node, canvas })
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user