Skip to content

Commit

Permalink
fix(isochrone): menu disappears when click on map when isochrone mode
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Feb 16, 2024
1 parent 156a9f0 commit c8b4086
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
22 changes: 0 additions & 22 deletions src/js/isochrone/isochrone.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ class Isochrone {
}
Globals.menu.updateScrollAnchors();
this.__unsetComputeButtonLoading();
this.interactive(false);
this.computed = true;
}

Expand Down Expand Up @@ -411,27 +410,6 @@ class Isochrone {
});
}

/**
* activation du mode interaction
* @param {*} status
* @public
*/
interactive(status) {
if (status) {
this.map.on("click", this.onAddWayPoint);
// desactiver les filtres de la couche POI osm en ouvrant le contrôle
if (this.poi) {
// TODO...
}
} else {
this.map.off("click", this.onAddWayPoint);
// reactiver les filtres de la couche POI osm en quittant le contrôle
if (this.poi) {
// TODO...
}
}
}

/**
* listener sur la carte pour recuperer les coordonnées du point
* @param {*} e
Expand Down
5 changes: 1 addition & 4 deletions src/js/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,6 @@ class MenuNavigation {
DOM.$filterPoiBtn.classList.add("d-none");
DOM.$sideBySideBtn.classList.add("d-none");
DOM.$backTopLeftBtn.classList.remove("d-none");
if (!Globals.isochrone.computed) {
Globals.isochrone.interactive(true);
}
Globals.interactivityIndicator.hardDisable();
Globals.currentScrollIndex = 1;
break;
Expand Down Expand Up @@ -432,6 +429,7 @@ class MenuNavigation {
case "routeDraw":
DOM.$search.style.display = "flex";
DOM.$filterPoiBtn.style.removeProperty("top");
DOM.$filterPoiBtn.classList.remove("d-none");
DOM.$backTopLeftBtn.classList.add("d-none");
DOM.$routeDrawBtns.classList.add("d-none");
DOM.$routeDrawEdit.classList.add("d-none");
Expand Down Expand Up @@ -472,7 +470,6 @@ class MenuNavigation {
DOM.$backTopLeftBtn.classList.add("d-none");
DOM.$sideBySideBtn.classList.remove("d-none");
Globals.isochrone.clear();
Globals.isochrone.interactive(false);
Globals.interactivityIndicator.enable();
break;
case "search":
Expand Down

0 comments on commit c8b4086

Please sign in to comment.