Bladeren bron

Merge pull request #351 from c3do/patch-1

Déplacer la correction de mainTop
Amauri CHAMPEAUX 5 jaren geleden
bovenliggende
commit
2e6b6db44d
1 gewijzigde bestanden met toevoegingen van 5 en 5 verwijderingen
  1. 5 5
      tarteaucitron.js

+ 5 - 5
tarteaucitron.js

@@ -1043,17 +1043,17 @@ var tarteaucitron = {
                         mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21;
                     }
 
-                    // correct
-                    if (mainTop < 0) {
-                        mainTop = 0;
-                    }
-
                     if (document.getElementById('tarteaucitronMainLineOffset') !== null) {
                         if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) {
                             mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
                         }
                     }
 
+                    // correct
+                    if (mainTop < 0) {
+                        mainTop = 0;
+                    }
+
                     // apply
                     tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
                 }