Skip to content

Commit da8bfda

Browse files
committed
bugfix: do not restrict segment inputs to allow trailing strips
1 parent e4f2964 commit da8bfda

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

wled00/data/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,10 @@ function onLoad()
310310
sl.addEventListener('touchstart', toggleBubble);
311311
sl.addEventListener('touchend', toggleBubble);
312312
});
313-
// limiter for all number inputs: limit inputs instantly
313+
// limiter for all number inputs except segment inputs: limit inputs instantly note: segment inputs are special if matrix is enabled, they allow for trailing strips, need a lot of special cases to handle that
314314
d.addEventListener("input", function(e) {
315315
const t = e.target;
316-
if (t.tagName === "INPUT" && t.type === "number") {
316+
if (t.tagName === "INPUT" && t.type === "number" && !(t.id && t.id.startsWith("seg"))) {
317317
let val = parseFloat(t.value);
318318
const max = parseFloat(t.max);
319319
const min = parseFloat(t.min);
@@ -1182,7 +1182,7 @@ function updateLen(s)
11821182
let mySD = gId("mkSYD");
11831183
if (isM) {
11841184
// do we have 1D segment *after* the matrix?
1185-
if (start >= mw*mh) {
1185+
if (start >= mw*mh && s > 0) {
11861186
if (sY) { sY.value = 0; sY.max = 0; sY.min = 0; }
11871187
if (eY) { eY.value = 1; eY.max = 1; eY.min = 0; }
11881188
sX.min = mw*mh; sX.max = ledCount-1;

0 commit comments

Comments
 (0)