maintenance: properly implemented preview popup for alternative cards, allowed re-selection of alternative cards

This commit is contained in:
matt 2025-10-06 14:12:17 -07:00
parent b7bf72efe8
commit beea79c76a
6 changed files with 214 additions and 23 deletions

View file

@ -1204,6 +1204,10 @@
document.addEventListener('mousemove', move);
function getCardFromEl(el){
if(!el) return null;
if(el.closest){
var altBtn = el.closest('.alts button[data-card-name]');
if(altBtn){ return altBtn; }
}
// If inside flip button
var btn = el.closest && el.closest('.dfc-toggle');
if(btn) return btn.closest('.card-sample, .commander-cell, .commander-thumb, .commander-card, .card-tile, .candidate-tile, .card-preview, .stack-card');