update to frame and tarot times

This commit is contained in:
2026-04-02 22:06:19 -07:00
parent e5d041101f
commit cac243f2cf
9 changed files with 394 additions and 44 deletions

View File

@@ -192,6 +192,7 @@
let config = {
ensureTarotSection: null,
getCards: () => [],
openCardLightbox: () => {},
getHouseTopCardsVisible: () => true,
getHouseTopInfoModes: () => ({}),
getHouseBottomCardsVisible: () => true,
@@ -1449,6 +1450,16 @@
return;
}
if (state.drag.sourceButton instanceof HTMLElement && typeof state.drag.sourceButton.releasePointerCapture === "function") {
try {
if (state.drag.sourceButton.hasPointerCapture?.(state.drag.pointerId)) {
state.drag.sourceButton.releasePointerCapture(state.drag.pointerId);
}
} catch (_error) {
// Ignore pointer-capture release failures during cleanup.
}
}
setHoverSlot("");
getSlotElement(state.drag.sourceSlotId)?.classList.remove("is-drag-source");
if (state.drag.ghostEl instanceof HTMLElement) {
@@ -1482,6 +1493,13 @@
return;
}
if (typeof config.openCardLightbox === "function") {
config.openCardLightbox(getCardId(card), {
onSelectCardId: () => {}
});
return;
}
const deckOptions = resolveDeckOptions(card);
const src = String(
tarotCardImages.resolveTarotCardImage?.(card.name, deckOptions)
@@ -1522,9 +1540,22 @@
startY: event.clientY,
started: false,
hoverSlotId: "",
ghostEl: null
ghostEl: null,
sourceButton: cardButton
};
if (typeof cardButton.setPointerCapture === "function") {
try {
cardButton.setPointerCapture(event.pointerId);
} catch (_error) {
// Ignore pointer-capture failures and continue with document listeners.
}
}
if (String(event.pointerType || "").toLowerCase() === "touch") {
event.preventDefault();
}
detachPointerListeners();
document.addEventListener("pointermove", handlePointerMove);
document.addEventListener("pointerup", handlePointerUp);