Skip to content

Commit

Permalink
fix(directions): my position in departure if set arrival to my position
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Dec 9, 2024
1 parent 9fe1567 commit 3f581bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/js/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ class MenuNavigation {
element.classList.remove("d-none");
}

let target = null;

// y'a t il des particularités sur l'ouverture du panneau demandé ?
var isSpecific = false;
switch (id) {
Expand Down Expand Up @@ -368,10 +370,9 @@ class MenuNavigation {
DOM.$fullScreenBtn.classList.remove("d-none");
DOM.$backTopLeftBtn.classList.remove("d-none");
Globals.interactivityIndicator.hardDisable();
// FIXME
// "Ma position" par défaut dans le départ quand disponible
if (!["searchDirections", "directions"].includes(previousBackState) && Location.getCurrentPosition()) {
let target = Globals.directions.dom.inputDeparture;
target = Globals.directions.dom.inputDeparture;
if (!target.value && Location.getCurrentPosition()) {
target.dataset.coordinates = "[" + Location.getCurrentPosition().coords.longitude + "," + Location.getCurrentPosition().coords.latitude + "]";
target.value = "Ma position";
}
Expand Down

0 comments on commit 3f581bb

Please sign in to comment.