@@ -335,25 +335,29 @@ DDJ200.init = function() {
335335 outValueScale : function ( value ) {
336336 return value >= 0 ? this . on : this . off ;
337337 } ,
338+ indicateDeck : function ( show_4decks , _group , _control ) {
339+ if ( ! show_4decks ) {
340+ DDJ200 . decks . left . setCurrentDeck ( "[Channel1]" ) ;
341+ DDJ200 . decks . right . setCurrentDeck ( "[Channel2]" ) ;
342+ DDJ200 . decks . forEachComponentContainer ( deck => {
343+ if ( deck . syncButton . blinkConnection ) {
344+ deck . syncButton . blinkConnection . disconnect ( ) ;
345+ deck . syncButton . send ( deck . syncButton . off ) ;
346+ } ;
347+ } , false ) ;
348+ } ;
349+ } ,
338350 shiftedInput : function ( _channel , _control , value , _status , _g ) {
339351 if ( value ) {
340352 engine . setValue ( "[Skin]" , "show_4decks" , ! engine . getValue ( "[Skin]" , "show_4decks" ) ) ;
341- if ( ! engine . getValue ( "[Skin]" , "show_4decks" ) ) {
342- DDJ200 . decks . left . setCurrentDeck ( "[Channel1]" ) ;
343- DDJ200 . decks . right . setCurrentDeck ( "[Channel2]" ) ;
344- DDJ200 . decks . forEachComponentContainer ( deck => {
345- if ( deck . syncButton . blinkConnection ) {
346- deck . syncButton . blinkConnection . disconnect ( ) ;
347- deck . syncButton . send ( deck . syncButton . off ) ;
348- } ;
349- } , false ) ;
350- } ;
351353 } ;
352354 } ,
353355 shutdown : function ( ) {
354356 this . send ( this . off ) ;
355357 }
356358 } ) ;
359+ engine . makeConnection ( "[Skin]" , "show_4decks" , this . headMixButton . indicateDeck ) ;
360+
357361
358362 this . transFxButton = new components . Button ( {
359363 midi : [ 0x96 , 0x59 ] ,
0 commit comments