Handyfon / Farchievements

Foundry Achievments. The first module to add player achievements to FoundryVTT!
3 stars 5 forks source link

Card fails to revert to the correct filter after tilt hover #61

Open Ikabodo opened 7 months ago

Ikabodo commented 7 months ago

A simple fix, not sure if it is efficient or not:

  1. Store the original filter when the page loads, somewhere around row 314

    document.querySelectorAll('.far-grid-item').forEach(card => {
    card.setAttribute('data-original-filter', card.style.filter);
    });
  2. On mouse leave reset it to the original filter instead of fixed to brightness(1).

    card.style.filter = card.getAttribute('data-original-filter'); // Reset to original filter