mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
Fix: inner_value_change not called on slider interaction
This commit is contained in:
@@ -9905,10 +9905,10 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "slider":
|
case "slider":
|
||||||
var range = w.options.max - w.options.min;
|
var old_value = w.value;
|
||||||
var nvalue = Math.clamp((x - 15) / (widget_width - 30), 0, 1);
|
var nvalue = Math.clamp((x - 15) / (widget_width - 30), 0, 1);
|
||||||
w.value = w.options.min + (w.options.max - w.options.min) * nvalue;
|
w.value = w.options.min + (w.options.max - w.options.min) * nvalue;
|
||||||
if (w.callback) {
|
if (old_value != w.value) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
inner_value_change(w, w.value);
|
inner_value_change(w, w.value);
|
||||||
}, 20);
|
}, 20);
|
||||||
|
|||||||
Reference in New Issue
Block a user