diff --git a/frontend/protos/index.html b/frontend/protos/index.html
index 671f142..8f20139 100644
--- a/frontend/protos/index.html
+++ b/frontend/protos/index.html
@@ -122,22 +122,22 @@
etatSectionLog('Etat courant '+currentEtatSection);
switch (currentEtatSection) {
case 1 :
- scrollToElement('#div_before_header');
- section_header.style.display = "block";
removeClassToElement('#div_navbar','navbar_fixed');
removeClassToElement('#div_before_synthese','div_before_synthese_when_navbar_fixed');
+ section_header.style.display = "block";
+ scrollToElement('#div_before_header');
break;
case 2 :
- scrollToElement('#div_before_navbar');
- section_synthese.style.display = "block";
addClassToElement('#div_navbar','navbar_fixed');
addClassToElement('#div_before_synthese','div_before_synthese_when_navbar_fixed');
+ scrollToElement('#div_before_navbar');
+ section_synthese.style.display = "block";
break;
case 3 :
- scrollToElement('#div_before_navbar');
- section_synthese.style.display = "none";
addClassToElement('#div_navbar','navbar_fixed');
addClassToElement('#div_before_synthese','div_before_synthese_when_navbar_fixed');
+ section_synthese.style.display = "none";
+ scrollToElement('#div_before_navbar');
break;
default :
break;
@@ -170,7 +170,7 @@
}
function beforeSection(_visible) {
- if (!_visible) changeSectionEtatUp();
+ if (!_visible) changeEtatSectionUp();
}
function afterSection(_visible) {
if (_visible) changeEtatSectionDown();
@@ -195,37 +195,25 @@
addIntersectionObserverEntry("div_before_header", beforeHeaderVisibility);
addIntersectionObserverEntry("div_after_header", afterHeaderVisibility);
addIntersectionObserverEntry("div_before_navbar", beforeNavbarVisibility);
- //addIntersectionObserverEntry("div_after_navbar", afterNavbarVisibility);
-
+ addIntersectionObserverEntry("div_after_navbar", afterNavbarVisibility);
+
+/*
let yprev = window.pageYOffset;
const scrollHandler = () => {
const y = window.pageYOffset;
const ymax = document.documentElement.scrollHeight - window.innerHeight;
if (y > yprev) {
- if (section_header.style.display !== "none") {
- section_header.style.display="none";
- } else {
- if (section_synthese.style.display !== "none") {
- section_synthese.style.display="none";
- }
- }
+ changeEtatSectionUp();
} else {
- if (y < yprev) {
- if (section_synthese.style.display !== "block") {
- section_synthese.style.display="block";
- } else {
- if (section_header.style.display !== "block") {
- section_header.style.display="block";
- }
- }
+ changeEtatSectionDown();
}
- }
yprev = Math.min(Math.max(y, 0), ymax);
};
- // window.addEventListener('scroll', throttleCallback(scrollHandler, 250));
+ window.addEventListener('scroll', scrollThrottleCallback(scrollHandler, 1000));
+*/
diff --git a/frontend/protos/zones.js b/frontend/protos/zones.js
index 11033b8..9fd19cc 100644
--- a/frontend/protos/zones.js
+++ b/frontend/protos/zones.js
@@ -39,7 +39,8 @@ const intersectionObserver = new IntersectionObserver(handleIntersectionObserver
// On met la hauteur en pixel entre la fin de l'image et la ligne rouge
// C'est négatif parce qu'on entre à l'intérieur de l'image. Si le nombre
// était positif, alors la ligne rouge se retrouverait sous l'image
- rootMargin: '-1px 0px'
+ rootMargin: '-1px 0px'
+ //rootMargin: '2px 0px'
});
function addIntersectionObserverEntry(_id, _func)