mirror of
https://github.com/wled/WLED.git
synced 2025-07-18 16:26:32 +00:00
Optimizations & bugfix.
This commit is contained in:
parent
2a5d20058f
commit
4ec1140cb4
@ -2801,7 +2801,7 @@ function size()
|
|||||||
if (isLv) h -= 4;
|
if (isLv) h -= 4;
|
||||||
sCol('--tp', h + "px");
|
sCol('--tp', h + "px");
|
||||||
togglePcMode();
|
togglePcMode();
|
||||||
if (cpick && pcMode) cpick.resize(wW>1023 && wW<1250 ? 230 : 260); /* for tablet in landscape */
|
lastw = wW;
|
||||||
}
|
}
|
||||||
|
|
||||||
function togglePcMode(fromB = false)
|
function togglePcMode(fromB = false)
|
||||||
@ -2809,19 +2809,16 @@ function togglePcMode(fromB = false)
|
|||||||
if (fromB) {
|
if (fromB) {
|
||||||
pcModeA = !pcModeA;
|
pcModeA = !pcModeA;
|
||||||
localStorage.setItem('pcm', pcModeA);
|
localStorage.setItem('pcm', pcModeA);
|
||||||
pcMode = pcModeA;
|
|
||||||
}
|
}
|
||||||
if (wW < 1024 && !pcMode) return;
|
pcMode = (wW >= 1024) && pcModeA;
|
||||||
if (!fromB && ((wW < 1024 && lastw < 1024) || (wW >= 1024 && lastw >= 1024))) return;
|
if (cpick) cpick.resize(pcMode && wW>1023 && wW<1250 ? 230 : 260); // for tablet in landscape
|
||||||
|
if (!fromB && ((wW < 1024 && lastw < 1024) || (wW >= 1024 && lastw >= 1024))) return; // no change in size and called from size()
|
||||||
openTab(0, true);
|
openTab(0, true);
|
||||||
if (wW < 1024) {pcMode = false;}
|
|
||||||
else if (pcModeA && !fromB) pcMode = pcModeA;
|
|
||||||
updateTablinks(0);
|
updateTablinks(0);
|
||||||
gId('buttonPcm').className = (pcMode) ? "active":"";
|
gId('buttonPcm').className = (pcMode) ? "active":"";
|
||||||
gId('bot').style.height = (pcMode && !cfg.comp.pcmbot) ? "0":"auto";
|
gId('bot').style.height = (pcMode && !cfg.comp.pcmbot) ? "0":"auto";
|
||||||
sCol('--bh', gId('bot').clientHeight + "px");
|
sCol('--bh', gId('bot').clientHeight + "px");
|
||||||
_C.style.width = (pcMode)?'100%':'400%';
|
_C.style.width = (pcMode)?'100%':'400%';
|
||||||
lastw = wW;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function mergeDeep(target, ...sources)
|
function mergeDeep(target, ...sources)
|
||||||
@ -2845,7 +2842,7 @@ function mergeDeep(target, ...sources)
|
|||||||
size();
|
size();
|
||||||
_C.style.setProperty('--n', N);
|
_C.style.setProperty('--n', N);
|
||||||
|
|
||||||
window.addEventListener('resize', size, false);
|
window.addEventListener('resize', size, true);
|
||||||
|
|
||||||
_C.addEventListener('mousedown', lock, false);
|
_C.addEventListener('mousedown', lock, false);
|
||||||
_C.addEventListener('touchstart', lock, false);
|
_C.addEventListener('touchstart', lock, false);
|
||||||
|
1045
wled00/html_ui.h
1045
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)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2303290
|
#define VERSION 2303310
|
||||||
|
|
||||||
//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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user