added thumbs generation for performation and also added a new deck format for registration
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
(function () {
|
||||
const { resolveTarotCardImage, getTarotCardDisplayName, getTarotCardSearchAliases } = window.TarotCardImages || {};
|
||||
const { resolveTarotCardImage, resolveTarotCardThumbnail, getTarotCardDisplayName, getTarotCardSearchAliases } = window.TarotCardImages || {};
|
||||
const tarotHouseUi = window.TarotHouseUi || {};
|
||||
const tarotRelationsUi = window.TarotRelationsUi || {};
|
||||
const tarotCardDerivations = window.TarotCardDerivations || {};
|
||||
@@ -339,6 +339,7 @@
|
||||
getMonthRefsByCardId: () => state.monthRefsByCardId,
|
||||
getMagickDataset: () => state.magickDataset,
|
||||
resolveTarotCardImage,
|
||||
resolveTarotCardThumbnail,
|
||||
getDisplayCardName,
|
||||
buildTypeLabel,
|
||||
clearChildren,
|
||||
@@ -751,6 +752,7 @@
|
||||
|
||||
tarotHouseUi.init?.({
|
||||
resolveTarotCardImage,
|
||||
resolveTarotCardThumbnail,
|
||||
getDisplayCardName,
|
||||
clearChildren,
|
||||
normalizeTarotCardLookupName,
|
||||
@@ -934,11 +936,16 @@
|
||||
|
||||
if (elements.tarotDetailImageEl) {
|
||||
elements.tarotDetailImageEl.addEventListener("click", () => {
|
||||
const src = elements.tarotDetailImageEl.getAttribute("src") || "";
|
||||
if (!src || elements.tarotDetailImageEl.style.display === "none") {
|
||||
if (elements.tarotDetailImageEl.style.display === "none" || !state.selectedCardId) {
|
||||
return;
|
||||
}
|
||||
window.TarotUiLightbox?.open?.(src, elements.tarotDetailImageEl.alt || "Tarot card enlarged image");
|
||||
|
||||
const request = buildLightboxCardRequestById(state.selectedCardId);
|
||||
if (!request?.src) {
|
||||
return;
|
||||
}
|
||||
|
||||
window.TarotUiLightbox?.open?.(request);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user