From f1437b60afca7b4bc3e6a60cbb7f1baa55563fc8 Mon Sep 17 00:00:00 2001 From: Max Smirnov <64789782+Smirnov75@users.noreply.github.com> Date: Sat, 15 Jun 2024 22:43:50 +0300 Subject: [PATCH] Fix Fixed a graphics bug during cloning --- js/Slider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/Slider.js b/js/Slider.js index f38a44c..220b7e3 100644 --- a/js/Slider.js +++ b/js/Slider.js @@ -28,7 +28,7 @@ class MXSlider { this.outputs[0].name = ""; this.widgets_start_y = -8; - this.intpos.x = (this.properties.value - this.properties.min) / (this.properties.max - this.properties.min); + this.intpos.x = clamp((this.properties.value-this.properties.min)/(this.properties.max-this.properties.min),0,1); this.outputs[0].type = (this.properties.decimals > 0)?"FLOAT":"INT"; if (this.size) if (this.size.length) if (this.size[1] > LiteGraph.NODE_SLOT_HEIGHT*1.5) this.size[1] = LiteGraph.NODE_SLOT_HEIGHT*1.5; };