Segment views >v
This commit is contained in:
@@ -304,15 +304,15 @@
|
||||
</div>
|
||||
|
||||
<div id="Segments" class="tabcontent">
|
||||
<!--WLEDMM Segment visualization-->
|
||||
<div id="peekvis">
|
||||
<p class="labels hd">Peek</p>
|
||||
<!--WLEDMM Views-->
|
||||
<div id="segviews">
|
||||
<p class="labels hd">Peek <button class="btn infobtn btn-xs" onclick="expandV(this,gId('canvasPeek'));">v</button></p>
|
||||
<canvas id="canvasPeek"></canvas><br>
|
||||
</div>
|
||||
<div id="segvis">
|
||||
<p class="labels hd">Segment visualization</p>
|
||||
<canvas id="canvasSegments"></canvas><br>
|
||||
<div id="MD"></div> <!-- Matrix dimensions -->
|
||||
<p class="labels hd">Segment view <button class="btn infobtn btn-xs" onclick="expandV(this,gId('segvis'));">v</button></p>
|
||||
<div id="segvis">
|
||||
<canvas id="canvasSegments"></canvas><br>
|
||||
<div class="labels hd" id="MD"></div> <!-- Matrix dimensions -->
|
||||
</div>
|
||||
</div>
|
||||
<div id="segcont">
|
||||
Loading...
|
||||
|
||||
@@ -851,7 +851,7 @@ function populateSegments(s)
|
||||
} else {
|
||||
gId("ledmap").classList.add('hide');
|
||||
}
|
||||
if (isM) drawSegments(); //WLEDMM
|
||||
if (isM) drawSegmentView(); //WLEDMM
|
||||
}
|
||||
|
||||
function populateEffects()
|
||||
@@ -1080,7 +1080,7 @@ function toggleBubble(e)
|
||||
}
|
||||
|
||||
// updates segment length upon input of segment values
|
||||
function updateLen(s, draw=true) //WLEDMM conditonally draw segment visualization
|
||||
function updateLen(s, draw=true) //WLEDMM conditonally draw segment view
|
||||
{
|
||||
if (!gId(`seg${s}s`)) return;
|
||||
var start = parseInt(gId(`seg${s}s`).value);
|
||||
@@ -1152,13 +1152,19 @@ function updateLen(s, draw=true) //WLEDMM conditonally draw segment visualizatio
|
||||
|
||||
gId(`seg${s}len`).innerHTML = out;
|
||||
|
||||
if (draw && isM) drawSegments(); //WLEDMM draw new segment visualization if something changes in a segment
|
||||
gId("segvis").style.display = isM? "inline":"none";
|
||||
gId("peekvis").style.display = isM? "inline":"none";
|
||||
if (draw && isM) drawSegmentView(); //WLEDMM draw new segmentview if something changes in a segment
|
||||
gId("segviews").style.display = isM? "inline":"none";
|
||||
}
|
||||
|
||||
//WLEDMM
|
||||
function drawSegments() {
|
||||
function expandV(o,i)
|
||||
{
|
||||
i.style.display = i.style.display!=="none" ? "none" : "";
|
||||
o.style.rotate = i.style.display==="none" ? "-90deg" : "none";
|
||||
}
|
||||
|
||||
//WLEDMM
|
||||
function drawSegmentView() {
|
||||
|
||||
var px, py, pw, ph;
|
||||
var topLeftX, topLeftY;
|
||||
@@ -1189,9 +1195,6 @@ function drawSegments() {
|
||||
if (!ctx) {
|
||||
//WLEDMM: add canvas, initialize and set UI
|
||||
var canvas = gId("canvasSegments");
|
||||
canvas.addEventListener('click', function() { gId("segvis").style.display = "none"; });
|
||||
canvasPeek.addEventListener('click', function() { gId("peekvis").style.display = "none"; });
|
||||
gId("segcont").addEventListener('click', function() { gId("segvis").style.display = "inline"; gId("peekvis").style.display = "inline";});
|
||||
ctx = canvas.getContext('2d');
|
||||
peek(canvasPeek);
|
||||
}
|
||||
@@ -3212,8 +3215,8 @@ function togglePcMode(fromB = false)
|
||||
_C.style.width = (pcMode)?'100%':'400%';
|
||||
lastw = wW;
|
||||
|
||||
//WLEDMM resize segment visualization
|
||||
if (isM) drawSegments();
|
||||
//WLEDMM resize segmentview
|
||||
if (isM) drawSegmentView();
|
||||
}
|
||||
|
||||
function mergeDeep(target, ...sources)
|
||||
|
||||
4401
wled00/html_ui.h
4401
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2302600
|
||||
#define VERSION 2302700
|
||||
|
||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||
//#define WLED_USE_MY_CONFIG
|
||||
|
||||
Reference in New Issue
Block a user