mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-21 18:10:12 +01:00
maintenance: properly implemented preview popup for alternative cards, allowed re-selection of alternative cards
This commit is contained in:
parent
b7bf72efe8
commit
beea79c76a
6 changed files with 214 additions and 23 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue