Merge branch 'mdev' into audio_fastpath

This commit is contained in:
Ewoud
2023-05-04 17:52:21 +02:00
9 changed files with 4051 additions and 4004 deletions

View File

@@ -89,7 +89,7 @@
<div class ="container">
<div id="Colors" class="tabcontent">
<div id="colorGFX"> <!--WLEDMM-->
<div id="colorGFX" hidden="true"> <!--WLEDMM-->
<br> <!--WLEDMM: instead of padding-top:18 in css-->
<div id="picker" class="noslide"></div>
<div id="hwrap" class="slider">
@@ -207,7 +207,7 @@
</div>
<div id="Effects" class="tabcontent">
<div id="effectGFX"> <!--WLEDMM-->
<div id="effectGFX" hidden="true"> <!--WLEDMM-->
<!-- <p class="labels hd">Peek ☾ <button class="btn infobtn btn-xs" onclick="eandp(this,gId('canvasPeek'));">v</button></p> -->
<br>
<canvas id="canvasPeek" onclick="bigPeek(true)"></canvas><br>
@@ -318,7 +318,7 @@
</div>
<div id="Segments" class="tabcontent">
<div id="segGFX"> <!--WLEDMM-->
<div id="segGFX" hidden="true"> <!--WLEDMM-->
<br>
<canvas id="canvasSegments"></canvas><br>
<br>

View File

@@ -611,9 +611,7 @@ function parseInfo(i) {
mw = i.leds.matrix ? i.leds.matrix.w : 0;
mh = i.leds.matrix ? i.leds.matrix.h : 0;
isM = mw>0 && mh>0;
if (isM) {
gId('buttonSr').className = "active"; isLv = true; //WLEDMM: on after load
} else {
if (!isM) {
gId("filter1D").classList.add('hide');
//gId("filter2D").classList.add('hide');
hideModes("2D");
@@ -863,7 +861,6 @@ function populateSegments(s)
} else {
gId("ledmap").classList.add('hide');
}
if (isM) drawSegmentView(); //WLEDMM
}
function populateEffects()
@@ -1166,8 +1163,6 @@ function updateLen(s, draw=true) //WLEDMM conditonally draw segment view
gId(`seg${s}len`).innerHTML = out;
if (draw && isM) drawSegmentView(); //WLEDMM draw new segmentview if something changes in a segment
gId("effectGFX").style.display = isM? "inline":"none";
gId("segGFX").style.display = isM? "inline":"none";
}
//WLEDMM
@@ -1203,7 +1198,6 @@ function drawSegmentView() {
//WLEDMM: add canvas, initialize and set UI
var canvas = gId("canvasSegments");
ctx = canvas.getContext('2d');
peek(canvasPeek);
}
let segments = gId("Segments");
@@ -1886,6 +1880,12 @@ function requestJson(command=null)
var s = json.state ? json.state : json;
readState(s);
//WLEDMM init, gfx default on upon web page load
if (isM) {
drawSegmentView();
toggleLiveview();
}
//load presets and open websocket sequentially
if (!pJson || isEmpty(pJson)) setTimeout(()=>{
loadPresets(()=>{