update app/ui-tarot-lightbox.js
This commit is contained in:
+13
-19
@@ -1624,17 +1624,20 @@
|
|||||||
mobileNextButtonEl.style.display = canNavigate ? "inline-flex" : "none";
|
mobileNextButtonEl.style.display = canNavigate ? "inline-flex" : "none";
|
||||||
mobilePrevButtonEl.setAttribute("aria-label", previousLabel);
|
mobilePrevButtonEl.setAttribute("aria-label", previousLabel);
|
||||||
mobileNextButtonEl.setAttribute("aria-label", nextLabel);
|
mobileNextButtonEl.setAttribute("aria-label", nextLabel);
|
||||||
mobilePrevButtonEl.style.width = isCompact ? "56px" : "44px";
|
mobilePrevButtonEl.style.width = isCompact ? "60px" : "44px";
|
||||||
mobileNextButtonEl.style.width = isCompact ? "56px" : "44px";
|
mobileNextButtonEl.style.width = isCompact ? "60px" : "44px";
|
||||||
mobilePrevButtonEl.style.height = isCompact ? "56px" : "44px";
|
mobilePrevButtonEl.style.height = isCompact ? "60px" : "44px";
|
||||||
mobileNextButtonEl.style.height = isCompact ? "56px" : "44px";
|
mobileNextButtonEl.style.height = isCompact ? "60px" : "44px";
|
||||||
mobilePrevButtonEl.style.font = isCompact ? "800 24px/1 sans-serif" : "700 20px/1 sans-serif";
|
mobilePrevButtonEl.style.font = isCompact ? "800 26px/1 sans-serif" : "700 20px/1 sans-serif";
|
||||||
mobileNextButtonEl.style.font = isCompact ? "800 24px/1 sans-serif" : "700 20px/1 sans-serif";
|
mobileNextButtonEl.style.font = isCompact ? "800 26px/1 sans-serif" : "700 20px/1 sans-serif";
|
||||||
|
|
||||||
if (!canNavigate) {
|
if (!canNavigate) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const toolbarBottom = isCompact
|
||||||
|
? "calc(12px + env(safe-area-inset-bottom, 0px))"
|
||||||
|
: null;
|
||||||
const mobileInfoPanelVisible = Boolean(
|
const mobileInfoPanelVisible = Boolean(
|
||||||
lightboxState.mobileInfoOpen
|
lightboxState.mobileInfoOpen
|
||||||
&& mobileInfoPanelEl
|
&& mobileInfoPanelEl
|
||||||
@@ -1666,23 +1669,14 @@
|
|||||||
helpPanelVisible && helpPanelEl instanceof HTMLElement ? helpPanelEl.offsetHeight + 12 : 0,
|
helpPanelVisible && helpPanelEl instanceof HTMLElement ? helpPanelEl.offsetHeight + 12 : 0,
|
||||||
deckPickerVisible && deckComparePanelEl instanceof HTMLElement ? deckComparePanelEl.offsetHeight + 12 : 0
|
deckPickerVisible && deckComparePanelEl instanceof HTMLElement ? deckComparePanelEl.offsetHeight + 12 : 0
|
||||||
);
|
);
|
||||||
const buttonBottomOffset = Math.max(
|
|
||||||
16,
|
|
||||||
mobileInfoPanelVisible ? infoPanelHeight + 16 : 16,
|
|
||||||
floatingPanelHeight ? floatingPanelHeight + 12 : 16
|
|
||||||
);
|
|
||||||
const bottomOffset = isCompact
|
const bottomOffset = isCompact
|
||||||
? buttonBottomOffset
|
? toolbarBottom
|
||||||
: toolbarHeight + floatingPanelHeight + (mobileInfoPanelVisible ? infoPanelHeight + 32 : 24);
|
: `${toolbarHeight + floatingPanelHeight + (mobileInfoPanelVisible ? infoPanelHeight + 32 : 24)}px`;
|
||||||
|
|
||||||
mobilePrevButtonEl.style.top = "auto";
|
mobilePrevButtonEl.style.top = "auto";
|
||||||
mobileNextButtonEl.style.top = "auto";
|
mobileNextButtonEl.style.top = "auto";
|
||||||
mobilePrevButtonEl.style.bottom = isCompact
|
mobilePrevButtonEl.style.bottom = isCompact ? bottomOffset : bottomOffset;
|
||||||
? `calc(${bottomOffset}px + env(safe-area-inset-bottom, 0px))`
|
mobileNextButtonEl.style.bottom = isCompact ? bottomOffset : bottomOffset;
|
||||||
: `${bottomOffset}px`;
|
|
||||||
mobileNextButtonEl.style.bottom = isCompact
|
|
||||||
? `calc(${bottomOffset}px + env(safe-area-inset-bottom, 0px))`
|
|
||||||
: `${bottomOffset}px`;
|
|
||||||
mobilePrevButtonEl.style.transform = "none";
|
mobilePrevButtonEl.style.transform = "none";
|
||||||
mobileNextButtonEl.style.transform = "none";
|
mobileNextButtonEl.style.transform = "none";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user