mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
Made it possible for sliders to be read only
This commit is contained in:
@@ -9909,6 +9909,7 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
case "slider":
|
case "slider":
|
||||||
var range = w.options.max - w.options.min;
|
var range = w.options.max - w.options.min;
|
||||||
var nvalue = Math.clamp((x - 15) / (widget_width - 30), 0, 1);
|
var nvalue = Math.clamp((x - 15) / (widget_width - 30), 0, 1);
|
||||||
|
if(w.readonly) break;
|
||||||
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 (w.callback) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user