Skip to content

Commit 5d540ae

Browse files
committed
fix(btns): display issues for layerManager and compare
1 parent c598a35 commit 5d540ae

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/css/map-buttons.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
4848
top: calc(76px + var(--safe-area-inset-top));
4949
}
5050

51+
#layerManagerBtn.highest {
52+
top: calc(10px + var(--safe-area-inset-top));
53+
}
54+
5155
#layerManagerBtn.active {
5256
background-image: url("assets/map-buttons/layers-w.svg");
5357
background-color: var(--dark-green);
@@ -417,6 +421,7 @@
417421
background-color: unset;
418422
position: absolute;
419423
bottom: 66px;
424+
transition: opacity 0.5s,
420425
}
421426

422427
.maplibregl-ctrl-bottom-right > .maplibregl-ctrl:has(.maplibregl-ctrl-shrink) {

src/js/event-listeners.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ function addListeners() {
268268
DOM.$bottomButtons.classList.remove("opacity0");
269269
DOM.$routeDrawEdit.classList.remove("opacity0");
270270
DOM.$filterPoiBtn.classList.remove("opacity0");
271+
DOM.$layerManagerBtn.classList.remove("opacity0");
271272
if (DOM.$fullScreenBtn) {
272273
DOM.$fullScreenBtn.classList.remove("opacity0");
273274
}
@@ -276,6 +277,7 @@ function addListeners() {
276277
DOM.$bottomButtons.classList.add("opacity0");
277278
DOM.$routeDrawEdit.classList.add("opacity0");
278279
DOM.$filterPoiBtn.classList.add("opacity0");
280+
DOM.$layerManagerBtn.classList.add("opacity0");
279281
if (DOM.$fullScreenBtn) {
280282
DOM.$fullScreenBtn.classList.add("opacity0");
281283
}

src/js/nav.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ class MenuNavigation {
266266
DOM.$bottomButtons.classList.add("compare");
267267
DOM.$bottomButtons.classList.add("compareWidth");
268268
DOM.$bottomButtons.querySelector(".maplibregl-ctrl-bottom-left").classList.add("d-none");
269+
DOM.$bottomButtons.querySelector(".maplibregl-ctrl-bottom-right").classList.add("d-none");
269270
Globals.compare.show();
270271
Globals.interactivityIndicator.hardDisable();
271272
Globals.currentScrollIndex = 0;
@@ -300,9 +301,9 @@ class MenuNavigation {
300301
Globals.routeDraw.deactivate();
301302
DOM.$search.classList.add("d-none");
302303
DOM.$filterPoiBtn.classList.add("higher");
304+
DOM.$layerManagerBtn.classList.add("highest");
303305
DOM.$backTopLeftBtn.classList.remove("d-none");
304306
DOM.$filterPoiBtn.classList.add("d-none");
305-
DOM.$fullScreenBtn.classList.add("d-none");
306307
Globals.currentScrollIndex = 2;
307308
break;
308309
case "layerManager":
@@ -341,7 +342,7 @@ class MenuNavigation {
341342
Globals.backButtonState = "isochrone-" + previousBackState;
342343
DOM.$search.classList.add("d-none");
343344
DOM.$filterPoiBtn.classList.add("d-none");
344-
DOM.$fullScreenBtn.classList.add("highest");
345+
DOM.$layerManagerBtn.classList.add("highest");
345346
DOM.$backTopLeftBtn.classList.remove("d-none");
346347
Globals.interactivityIndicator.hardDisable();
347348
Globals.currentScrollIndex = 1;
@@ -547,6 +548,7 @@ class MenuNavigation {
547548
DOM.$bottomButtons.classList.remove("compare");
548549
DOM.$bottomButtons.classList.add("compareWidth");
549550
DOM.$bottomButtons.querySelector(".maplibregl-ctrl-bottom-left").classList.remove("d-none");
551+
DOM.$bottomButtons.querySelector(".maplibregl-ctrl-bottom-right").classList.remove("d-none");
550552
Globals.compare.hide();
551553
Globals.interactivityIndicator.enable();
552554
break;
@@ -581,10 +583,9 @@ class MenuNavigation {
581583
case "poi":
582584
DOM.$search.classList.remove("d-none");
583585
DOM.$filterPoiBtn.classList.remove("higher");
584-
DOM.$layerManagerBtn.classList.remove("higher");
585586
DOM.$backTopLeftBtn.classList.add("d-none");
586587
DOM.$filterPoiBtn.classList.remove("d-none");
587-
DOM.$fullScreenBtn.classList.remove("d-none");
588+
DOM.$layerManagerBtn.classList.remove("highest");
588589
break;
589590
case "layerManager":
590591
DOM.$search.classList.remove("d-none");
@@ -608,7 +609,7 @@ class MenuNavigation {
608609
// FIXME mettre en place une méthode sur la classe Searchs
609610
DOM.$search.classList.remove("d-none");
610611
DOM.$filterPoiBtn.classList.remove("d-none");
611-
DOM.$fullScreenBtn.classList.remove("highest");
612+
DOM.$layerManagerBtn.classList.remove("highest");
612613
DOM.$backTopLeftBtn.classList.add("d-none");
613614
Globals.isochrone.clear();
614615
Globals.isochrone.clearForm();

0 commit comments

Comments
 (0)