diff --git a/.gitignore b/.gitignore index 03a576d..6b73644 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.zip +*.sql diff --git a/Dockerfile b/Dockerfile index ad5e742..1be172a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,21 @@ EXPOSE 3000 WORKDIR /app/server +# Ajout du serveur MySQL +FROM mysql:latest + +ENV MYSQL_ROOT_PASSWORD=CHANGEIT +ENV MYSQL_DATABASE=ac2re + +# Copie du fichier SQL +COPY db.sql /docker-entrypoint-initdb.d/ + +# Exécution du fichier SQL lors du démarrage du conteneur +CMD ["mysqld", "--init-file", "/docker-entrypoint-initdb.d/db.sql"] + +# Retour au répertoire node +FROM node:latest + +WORKDIR /app/server + CMD ["npm", "start"] \ No newline at end of file diff --git a/public/scripts/main.js b/public/scripts/main.js index 72c6fa5..17e460d 100644 --- a/public/scripts/main.js +++ b/public/scripts/main.js @@ -15,4 +15,4 @@ map.on("click", function (ev) { }); //Interval Player Overlay -setInterval(InitOverlayPlayer, 5000); \ No newline at end of file +//setInterval(InitOverlayPlayer, 5000); \ No newline at end of file diff --git a/public/scripts/modules/math.js b/public/scripts/modules/math.js index 92971dd..2cbdcb3 100644 --- a/public/scripts/modules/math.js +++ b/public/scripts/modules/math.js @@ -21,7 +21,7 @@ export function coordToCardinal(lat, lng) { let directionLng = lng < CENTER ? "W" : "E"; // Retourner la chaîne de caractères résultante - return cardinalLat.toFixed(1) + " " + directionLat + " - " + cardinalLng.toFixed(1) + " " + directionLng; + return cardinalLat.toFixed(1) + "" + directionLat + " " + cardinalLng.toFixed(1) + "" + directionLng; } export function GetLandBlockId(ev, map) { diff --git a/public/scripts/overlays/overlaysCoord.js b/public/scripts/overlays/overlaysCoord.js index 1aa153e..700b66e 100644 --- a/public/scripts/overlays/overlaysCoord.js +++ b/public/scripts/overlays/overlaysCoord.js @@ -5,6 +5,8 @@ var coordOverlay = L.control({ position: "bottomleft" }); coordOverlay.onAdd = function (map) { this._div = L.DomUtil.create("div", "coordinates-overlay"); this._div.innerHTML = "Cliquez sur la carte pour voir les coordonnées"; + // Empêcher la propagation des clics sur l'overlay à la carte + L.DomEvent.disableClickPropagation(this._div); return this._div; };