11//page js
22var loc = false , locip ;
3- var isOn = false , nlA = false , isLv = true , isInfo = false , isNodes = false , syncSend = false , syncTglRecv = true ;
3+ var isOn = false , nlA = false , isLv = false , isInfo = false , isNodes = false , syncSend = false , syncTglRecv = true ;
44var hasWhite = false , hasRGB = false , hasCCT = false ;
55var nlDur = 60 , nlTar = 0 ;
66var nlMode = false ;
@@ -269,8 +269,6 @@ function onLoad()
269269 sl . addEventListener ( 'touchstart' , toggleBubble ) ;
270270 sl . addEventListener ( 'touchend' , toggleBubble ) ;
271271 }
272-
273- gId ( 'buttonSr' ) . className = "active" ; //WLEDMM: on after load
274272}
275273
276274function updateTablinks ( tabI )
@@ -613,7 +611,9 @@ function parseInfo(i) {
613611 mw = i . leds . matrix ? i . leds . matrix . w : 0 ;
614612 mh = i . leds . matrix ? i . leds . matrix . h : 0 ;
615613 isM = mw > 0 && mh > 0 ;
616- if ( ! isM ) {
614+ if ( isM ) {
615+ gId ( 'buttonSr' ) . className = "active" ; isLv = true ; //WLEDMM: on after load
616+ } else {
617617 gId ( "filter1D" ) . classList . add ( 'hide' ) ;
618618 //gId("filter2D").classList.add('hide');
619619 hideModes ( "2D" ) ;
@@ -3235,7 +3235,7 @@ function size()
32353235 var h = gId ( 'top' ) . clientHeight ;
32363236 sCol ( '--th' , h + "px" ) ;
32373237 sCol ( '--bh' , gId ( 'bot' ) . clientHeight + "px" ) ;
3238- if ( isLv ) h -= 4 ;
3238+ if ( isLv && ! isM ) h -= 4 ; //WLEDMM: no for matrices
32393239 sCol ( '--tp' , h + "px" ) ;
32403240 togglePcMode ( ) ;
32413241}
@@ -3247,7 +3247,7 @@ function togglePcMode(fromB = false)
32473247 localStorage . setItem ( 'pcm' , pcModeA ) ;
32483248 pcMode = pcModeA ;
32493249 }
3250- if ( wW < 1024 && ! pcMode ) return ;
3250+ if ( wW <= 1024 && ! pcMode ) return ;
32513251 if ( ! fromB && ( ( wW <= 1024 && lastw <= 1024 ) || ( wW > 1024 && lastw > 1024 ) ) ) return ;
32523252 openTab ( 0 , true ) ;
32533253 if ( wW <= 1024 ) { pcMode = false ; }
0 commit comments