Merge pull request #351 from c3do/patch-1
Déplacer la correction de mainTop
This commit is contained in:
commit
2e6b6db44d
|
|
@ -1043,17 +1043,17 @@ var tarteaucitron = {
|
||||||
mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21;
|
mainTop = ((windowInnerHeight - document.getElementById('tarteaucitron').offsetHeight) / 2) - 21;
|
||||||
}
|
}
|
||||||
|
|
||||||
// correct
|
|
||||||
if (mainTop < 0) {
|
|
||||||
mainTop = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (document.getElementById('tarteaucitronMainLineOffset') !== null) {
|
if (document.getElementById('tarteaucitronMainLineOffset') !== null) {
|
||||||
if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) {
|
if (document.getElementById('tarteaucitron').offsetHeight < (windowInnerHeight / 2)) {
|
||||||
mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
|
mainTop -= document.getElementById('tarteaucitronMainLineOffset').offsetHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// correct
|
||||||
|
if (mainTop < 0) {
|
||||||
|
mainTop = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// apply
|
// apply
|
||||||
tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
|
tarteaucitron.userInterface.css('tarteaucitron', 'top', mainTop + 'px');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue