Moved properties to the right place.

This commit is contained in:
Baldur Gislason
2023-04-05 15:41:07 +00:00
parent f55bbacf02
commit d2c46d3e6d

View File

@@ -9734,7 +9734,7 @@ LGraphNode.prototype.executeAction = function(action)
var nvalue = (w.value - w.options.min) / range;
if(nvalue < 0.0) nvalue = 0.0;
if(nvalue > 1.0) nvalue = 1.0;
ctx.fillStyle = w.hasOwnProperty("slider_color") ? w.slider_color : (active_widget == w ? "#89A" : "#678");
ctx.fillStyle = w.options.hasOwnProperty("slider_color") ? w.slider_color : (active_widget == w ? "#89A" : "#678");
ctx.fillRect(margin, y, nvalue * (widget_width - margin * 2), H);
if(show_text && !w.disabled)
ctx.strokeRect(margin, y, widget_width - margin * 2, H);
@@ -9742,7 +9742,7 @@ LGraphNode.prototype.executeAction = function(action)
var marker_nvalue = (w.marker - w.options.min) / range;
if(marker_nvalue < 0.0) marker_nvalue = 0.0;
if(marker_nvalue > 1.0) marker_nvalue = 1.0;
ctx.fillStyle = w.hasOwnProperty("marker_color") ? w.marker_color : "#AA9";
ctx.fillStyle = w.options.hasOwnProperty("marker_color") ? w.marker_color : "#AA9";
ctx.fillRect( margin + marker_nvalue * (widget_width - margin * 2), y, 2, H );
}
if (show_text) {
@@ -9909,7 +9909,7 @@ LGraphNode.prototype.executeAction = function(action)
case "slider":
var range = w.options.max - w.options.min;
var nvalue = Math.clamp((x - 15) / (widget_width - 30), 0, 1);
if(w.readonly) break;
if(w.options.readonly) break;
w.value = w.options.min + (w.options.max - w.options.min) * nvalue;
if (w.callback) {
setTimeout(function() {