Create or delete bigPeek (click on smallPeek/bigPeek)

This commit is contained in:
Ewoud
2023-03-29 21:59:49 +02:00
parent fd658fcc32
commit d9c886abdc
5 changed files with 1652 additions and 1627 deletions

View File

@@ -330,9 +330,9 @@ class GamesUsermod : public Usermod {
strip.addEffect(255, &mode_pongGame, _data_FX_MODE_PONGGAME); strip.addEffect(255, &mode_pongGame, _data_FX_MODE_PONGGAME);
#ifdef USERMOD_MPU6050_IMU #ifdef USERMOD_MPU6050_IMU
IMU = (MPU6050Driver *)usermods.lookup(USERMOD_ID_IMU); IMU = (MPU6050Driver *)usermods.lookup(USERMOD_ID_IMU);
// #ifdef WLED_DEBUG #ifdef WLED_DEBUG
strip.addEffect(255, &mode_IMUTest, _data_FX_MODE_IMUTest); strip.addEffect(255, &mode_IMUTest, _data_FX_MODE_IMUTest);
// #endif #endif
#endif #endif
strip.addEffect(255, &mode_3DIMUCube, _data_FX_MODE_3DIMUCube); //works also without IMU strip.addEffect(255, &mode_3DIMUCube, _data_FX_MODE_3DIMUCube); //works also without IMU
} }

View File

@@ -66,7 +66,7 @@
<button id="buttonPower" onclick="togglePower()" class="tgl"><i class="icons">&#xe08f;</i><p class="tab-label">Power</p></button> <button id="buttonPower" onclick="togglePower()" class="tgl"><i class="icons">&#xe08f;</i><p class="tab-label">Power</p></button>
<button id="buttonNl" onclick="toggleNl()"><i class="icons">&#xe2a2;</i><p class="tab-label">Timer</p></button> <button id="buttonNl" onclick="toggleNl()"><i class="icons">&#xe2a2;</i><p class="tab-label">Timer</p></button>
<button id="buttonSync" onclick="toggleSync()"><i class="icons">&#xe116;</i><p class="tab-label">Sync</p></button> <button id="buttonSync" onclick="toggleSync()"><i class="icons">&#xe116;</i><p class="tab-label">Sync</p></button>
<button id="buttonSr" onclick="toggleLiveview()"><i class="icons">&#xe410;</i><p class="tab-label">GFX</p></button> <button id="buttonSr" onclick="toggleLiveview()"><i class="icons">&#xe410;</i><p class="tab-label">GFX</p></button>
<button id="buttonI" onclick="toggleInfo()"><i class="icons">&#xe066;</i><p class="tab-label">Info</p></button> <button id="buttonI" onclick="toggleInfo()"><i class="icons">&#xe066;</i><p class="tab-label">Info</p></button>
<button id="buttonNodes" onclick="toggleNodes()"><i class="icons">&#xe22d;</i><p class="tab-label">Nodes</p></button> <button id="buttonNodes" onclick="toggleNodes()"><i class="icons">&#xe22d;</i><p class="tab-label">Nodes</p></button>
<button onclick="window.location.href='/settings';"><i class="icons">&#xe0a2;</i><p class="tab-label">Config</p></button> <button onclick="window.location.href='/settings';"><i class="icons">&#xe0a2;</i><p class="tab-label">Config</p></button>
@@ -210,7 +210,7 @@
<div id="effectGFX"> <!--WLEDMM--> <div id="effectGFX"> <!--WLEDMM-->
<!-- <p class="labels hd">Peek ☾ <button class="btn infobtn btn-xs" onclick="eandp(this,gId('canvasPeek'));">v</button></p> --> <!-- <p class="labels hd">Peek ☾ <button class="btn infobtn btn-xs" onclick="eandp(this,gId('canvasPeek'));">v</button></p> -->
<br> <br>
<canvas id="canvasPeek"></canvas><br> <canvas id="canvasPeek" onclick="bigPeek(true)"></canvas><br>
<br> <br>
</div> </div>
<div id="fx"> <div id="fx">

View File

@@ -1963,6 +1963,22 @@ function toggleLiveview()
if (ws && ws.readyState === WebSocket.OPEN) ws.send(`{"lv":${isLv}}`); if (ws && ws.readyState === WebSocket.OPEN) ws.send(`{"lv":${isLv}}`);
} }
//WLEDMM create and delete iFrame for peek (isLv is true if create)
function bigPeek(doCreate)
{
let lvID = "liveview2D"
if (doCreate) {
var cn = '<iframe id="liveview2D" src="about:blank" onload="this.contentWindow.document.body.onclick=function(){bigPeek(false);}"></iframe>';
gId('kliveview2D').innerHTML = cn;
}
gId('mliveview2D').style.transform = (doCreate) ? "translateY(0px)":"translateY(100%)";
gId(lvID).style.display = (doCreate) ? "block":"none";
var url = (loc?`http://${locip}`:'') + "/" + lvID;
gId(lvID).src = (doCreate) ? url:"about:blank";
}
function toggleInfo() function toggleInfo()
{ {
if (isNodes) toggleNodes(); if (isNodes) toggleNodes();

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2303280 #define VERSION 2303290
//uncomment this if you have a "my_config.h" file you'd like to use //uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG //#define WLED_USE_MY_CONFIG