@@ -736,7 +750,7 @@ function populateSegments(s)
if (!gId(`seg${i}sel`).checked) gId(`selall`).checked = false;
}
if (segCount < 2) gId(`segd${lSeg}`).style.display = "none";
- if (!noNewSegs && (cfg.comp.seglen?parseInt(gId(`seg${lSeg}s`).value):0)+parseInt(gId(`seg${lSeg}e`).value)
1) ? "inline":"none";
}
@@ -966,6 +980,11 @@ function updateLen(s)
var start = parseInt(gId(`seg${s}s`).value);
var stop = parseInt(gId(`seg${s}e`).value);
var len = stop - (cfg.comp.seglen?0:start);
+ if (isM) {
+ start = parseInt(gId(`seg${s}sY`).value);
+ stop = parseInt(gId(`seg${s}eY`).value);
+ len *= (stop-(cfg.comp.seglen?0:start));
+ }
var out = "(delete)";
if (len > 1) {
out = `${len} LEDs`;
@@ -1280,7 +1299,7 @@ function setSliderAndColorControl(idx, applyDef=false)
var v = Math.max(0,Math.min(255,parseInt(slOnOff[i].substr(dPos+1))));
if (i==0) { if (applyDef) gId("sliderSpeed").value = v; obj.seg.sx = v; }
else if (i==1) { if (applyDef) gId("sliderIntensity").value = v; obj.seg.ix = v; }
- else { if (applyDef) gId("sliderC"+(i-1)).value = v; obj.seg["C"+(i-1)] = v}
+ else { if (applyDef) gId("sliderC"+(i-1)).value = v; obj.seg["c"+(i-1)+"x"] = v}
slOnOff[i] = slOnOff[i].substring(0,dPos);
}
if (slOnOff.length>i && slOnOff[i]!="!") label.innerHTML = slOnOff[i];
@@ -1501,6 +1520,7 @@ function makeSeg()
{
var ns = 0;
var lu = lowestUnused;
+ let li = lastinfo;
if (lu > 0) {
var pend = parseInt(gId(`seg${lu -1}e`).value,10) + (cfg.comp.seglen?parseInt(gId(`seg${lu -1}s`).value,10):0);
if (pend < ledCount) ns = pend;
@@ -1515,14 +1535,19 @@ function makeSeg()
${ledCount - ns} LEDs
@@ -1813,6 +1838,7 @@ function selSeg(s)
function rptSeg(s)
{
+ //TODO: 2D support
var name = gId(`seg${s}t`).value;
var start = parseInt(gId(`seg${s}s`).value);
var stop = parseInt(gId(`seg${s}e`).value);
@@ -1842,6 +1868,12 @@ function setSeg(s)
var stop = parseInt(gId(`seg${s}e`).value);
if ((cfg.comp.seglen && stop == 0) || (!cfg.comp.seglen && stop <= start)) {delSeg(s); return;}
var obj = {"seg": {"id": s, "n": name, "start": start, "stop": (cfg.comp.seglen?start:0)+stop}};
+ if (isM) {
+ var startY = parseInt(gId(`seg${s}sY`).value);
+ var stopY = parseInt(gId(`seg${s}eY`).value);
+ obj.seg.startY = startY;
+ obj.seg.stopY = (cfg.comp.seglen?startY:0)+stopY;
+ }
if (gId(`seg${s}grp`)) {
var grp = parseInt(gId(`seg${s}grp`).value);
var spc = parseInt(gId(`seg${s}spc`).value);
@@ -1871,6 +1903,13 @@ function setRev(s)
requestJson(obj);
}
+function setRevY(s)
+{
+ var rev = gId(`seg${s}rY`).checked;
+ var obj = {"seg": {"id": s, "rY": rev}};
+ requestJson(obj);
+}
+
function setMi(s)
{
var mi = gId(`seg${s}mi`).checked;
@@ -1878,6 +1917,20 @@ function setMi(s)
requestJson(obj);
}
+function setMiY(s)
+{
+ var mi = gId(`seg${s}mY`).checked;
+ var obj = {"seg": {"id": s, "mY": mi}};
+ requestJson(obj);
+}
+
+function setTp(s)
+{
+ var tp = gId(`seg${s}tp`).checked;
+ var obj = {"seg": {"id": s, "tp": tp}};
+ requestJson(obj);
+}
+
function setSegPwr(s)
{
var pwr = gId(`seg${s}pwr`).classList.contains("act");
diff --git a/wled00/data/settings.htm b/wled00/data/settings.htm
index 8fecc521..123bbe95 100644
--- a/wled00/data/settings.htm
+++ b/wled00/data/settings.htm
@@ -18,31 +18,33 @@
margin: 0;
}
html {
- --h: 10.2vh;
+ --h: 9vh;
}
button {
background: #333;
color: #fff;
font-family: Verdana, Helvetica, sans-serif;
- display: inline-block;
+ display: block;
border: 1px solid #333;
border-radius: var(--h);
font-size: 6vmin;
height: var(--h);
width: calc(100% - 40px);
margin-top: 2vh;
+ cursor: pointer;
}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+