From 0028c3c6401b08174939fcd3697d0fb5cc5a9328 Mon Sep 17 00:00:00 2001 From: Andreas Perhab Date: Tue, 15 Sep 2020 21:59:12 +0200 Subject: [PATCH] enable sliders with a different max value (#1156) * enable sliders with a different max value * Only change in index.htm for now Co-authored-by: cschwinne --- wled00/data/index.htm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wled00/data/index.htm b/wled00/data/index.htm index 8b532de8e..18415357f 100644 --- a/wled00/data/index.htm +++ b/wled00/data/index.htm @@ -1432,7 +1432,8 @@ function populateSegments(s) function updateTrail(e, slidercol) { if (e==null) return; - var progress = e.value *100 /255; + var max = e.hasAttribute('max') ? e.attributes['max'].value : 255; + var progress = e.value * 100 / max; progress = parseInt(progress); var scol; switch (slidercol) {