BraydenMoore commited on
Commit
9177931
·
1 Parent(s): 32f8d09

Update styling

Browse files
Files changed (1) hide show
  1. Templates/index.html +7 -3
Templates/index.html CHANGED
@@ -570,9 +570,14 @@
570
  function showProbabilityOnHover(div) {
571
  let previousValue;
572
  let divText = div.children[1];
 
573
 
574
  function handleEnter() {
575
- if (divText.textContent !== `(${div.dataset.proba}%)`){
 
 
 
 
576
  divText.style.opacity = 0;
577
 
578
  setTimeout(() => {
@@ -584,13 +589,12 @@
584
  setTimeout(() => {
585
  divText.style.opacity = 0;
586
  setTimeout(() => {
587
- divText.textContent = "";
588
  divText.textContent = previousValue;
589
  divText.style.opacity = 1;
 
590
  }, 300);
591
  }, 1000);
592
  }
593
-
594
  }
595
 
596
  // For desktop
 
570
  function showProbabilityOnHover(div) {
571
  let previousValue;
572
  let divText = div.children[1];
573
+ let eventProcessed = false;
574
 
575
  function handleEnter() {
576
+ if (eventProcessed) return; // Skip if an event has already been processed
577
+
578
+ eventProcessed = true;
579
+
580
+ if (divText.textContent !== `(${div.dataset.proba}%)`) {
581
  divText.style.opacity = 0;
582
 
583
  setTimeout(() => {
 
589
  setTimeout(() => {
590
  divText.style.opacity = 0;
591
  setTimeout(() => {
 
592
  divText.textContent = previousValue;
593
  divText.style.opacity = 1;
594
+ eventProcessed = false; // Reset the flag
595
  }, 300);
596
  }, 1000);
597
  }
 
598
  }
599
 
600
  // For desktop