assets/themes/j1/adapter/js/justifiedGallery.js in j1-template-2023.2.4 vs assets/themes/j1/adapter/js/justifiedGallery.js in j1-template-2023.2.5

- old
+ new

@@ -128,10 +128,14 @@ _this = j1.adapter.justifiedGallery; logger = log4javascript.getLogger('j1.adapter.justifiedGallery'); var dependencies_met_j1_finished= setInterval(function() { - if (j1.getState() == 'finished') { + var pageState = $('#no_flicker').css("display"); + var pageVisible = (pageState == 'block') ? true : false; + var atticFinished = (j1.adapter.attic.getState() == 'finished') ? true: false; + + if (j1.getState() == 'finished' && pageVisible && atticFinished) { // initialize state flag _this.setState('started'); logger.debug('\n' + 'state: ' + _this.getState()); logger.info('\n' + 'module is being initialized');