exploded-classic #1
@ -526,10 +526,10 @@
|
||||
let current = '#tab-organic';
|
||||
const isMobileView = () => window.matchMedia('(max-width: 1023px)').matches;
|
||||
const updateMobileActionBarVisibility = () => {
|
||||
if (!mobileActionBar) return;
|
||||
const modalOpen = !!document.querySelector('.color-modal:not(.hidden)');
|
||||
const shouldShow = current === '#tab-organic' && isMobileView() && !modalOpen;
|
||||
mobileActionBar.classList.toggle('hidden', !shouldShow);
|
||||
const isMobile = isMobileView();
|
||||
const showOrganic = isMobile && !modalOpen && current === '#tab-organic';
|
||||
if (mobileActionBar) mobileActionBar.classList.toggle('hidden', !showOrganic);
|
||||
};
|
||||
const wireMobileActionButtons = () => {
|
||||
const guardOrganic = () => current === '#tab-organic';
|
||||
@ -549,6 +549,7 @@
|
||||
on('mobile-act-export', () => clickBtn('[data-export="png"]'));
|
||||
};
|
||||
wireMobileActionButtons();
|
||||
|
||||
window.addEventListener('resize', updateMobileActionBarVisibility);
|
||||
function setTab(id, isInitial = false) {
|
||||
if (!id || !document.querySelector(id)) id = '#tab-organic';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user