Merge pull request #297 from mcejp/patch-slider-property

Fix: inner_value_change not called on slider interaction
This commit is contained in:
Javi Agenjo
2023-04-23 20:39:05 +02:00
committed by GitHub

View File

@@ -9950,11 +9950,11 @@ LGraphNode.prototype.executeAction = function(action)
}
break;
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);
if(w.options.read_only) break;
w.value = w.options.min + (w.options.max - w.options.min) * nvalue;
if (w.callback) {
if (old_value != w.value) {
setTimeout(function() {
inner_value_change(w, w.value);
}, 20);