clear liste etape scroll, set header position based on content or not, local storage for disable animation
This commit is contained in:
@@ -4,16 +4,30 @@ export function handleReactiveness() {
|
||||
const layoutStore = useLayoutStore();
|
||||
layoutStore.setupResizeListenner();
|
||||
|
||||
(function setupEtapeListeCollapse() {
|
||||
const listeToggleButton = document.querySelector('#retractable-message');
|
||||
|
||||
// toggle collapse and scroll for etape liste
|
||||
(function setEtapeListe() {
|
||||
const listeEtape = document.querySelector('#etapes-liste');
|
||||
const listeToggleButton = document.querySelector('#retractable-message');
|
||||
const column = document.querySelector('.layout__region--third');
|
||||
const header = document.querySelector('.layout-container > header');
|
||||
|
||||
const animationToggle = document.querySelector('#animation-toggle');
|
||||
|
||||
const EtapeListeScrollElements = {
|
||||
listeEtape,
|
||||
column,
|
||||
listeEtapeContent: listeEtape.querySelector('.item-list'),
|
||||
header,
|
||||
animationToggle: animationToggle.querySelector('.animation-toggle-container')
|
||||
}
|
||||
|
||||
layoutStore.shouldEtapeListeScroll(EtapeListeScrollElements);
|
||||
|
||||
if (!layoutStore.isDesktop) layoutStore.collapseEtapeListe(listeEtape, animationToggle);
|
||||
|
||||
window.addEventListener('resize', () => {
|
||||
layoutStore.shouldEtapeListeScroll(EtapeListeScrollElements);
|
||||
|
||||
if (layoutStore.isDesktop && layoutStore.isEtapeListRetracted) {
|
||||
layoutStore.expandEtapeListe(listeEtape, animationToggle);
|
||||
} else if (!layoutStore.isDesktop && !layoutStore.isEtapeListRetracted) {
|
||||
@@ -27,16 +41,11 @@ export function handleReactiveness() {
|
||||
layoutStore.collapseEtapeListe(listeEtape, animationToggle);
|
||||
} else {
|
||||
layoutStore.expandEtapeListe(listeEtape, animationToggle);
|
||||
layoutStore.shouldEtapeListeScroll(EtapeListeScrollElements);
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
layoutStore.checkIfEtapeListeShouldScroll();
|
||||
|
||||
window.addEventListener('resize', () => {
|
||||
layoutStore.checkIfEtapeListeShouldScroll();
|
||||
});
|
||||
}
|
||||
|
||||
export function setMenuToggle() {
|
||||
|
Reference in New Issue
Block a user