Skip to content

Commit 7ab10b5

Browse files
authored
Merge pull request #297 from mcejp/patch-slider-property
Fix: inner_value_change not called on slider interaction
2 parents 2047cfa + 537993e commit 7ab10b5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/litegraph.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9950,11 +9950,11 @@ LGraphNode.prototype.executeAction = function(action)
99509950
}
99519951
break;
99529952
case "slider":
9953-
var range = w.options.max - w.options.min;
9953+
var old_value = w.value;
99549954
var nvalue = Math.clamp((x - 15) / (widget_width - 30), 0, 1);
99559955
if(w.options.read_only) break;
99569956
w.value = w.options.min + (w.options.max - w.options.min) * nvalue;
9957-
if (w.callback) {
9957+
if (old_value != w.value) {
99589958
setTimeout(function() {
99599959
inner_value_change(w, w.value);
99609960
}, 20);

0 commit comments

Comments
 (0)