Skip to content
Snippets Groups Projects
Commit 2ac41e83 authored by Alexis POYEN's avatar Alexis POYEN
Browse files

Feat : handle zoom and unzoom on map

parent f5d4fc69
No related branches found
No related tags found
1 merge request!71Resolve "Display a map"
Pipeline #6555 passed
...@@ -138,6 +138,9 @@ class ResultZoneComponent { ...@@ -138,6 +138,9 @@ class ResultZoneComponent {
let resultHandler = this; let resultHandler = this;
document.getElementById("map-section").parentElement.className = document.getElementById("map-section").parentElement.className =
"column is-full"; "column is-full";
console.log(this.ResultsMap);
if (this.parent.zone === "areas") this.ResultsMap.displayMapAreas();
else this.ResultsMap.displayMapSections();
document.getElementById("zoom-map").addEventListener("click", function () { document.getElementById("zoom-map").addEventListener("click", function () {
resultHandler.unZoom(); resultHandler.unZoom();
}); });
...@@ -217,6 +220,9 @@ class ResultZoneComponent { ...@@ -217,6 +220,9 @@ class ResultZoneComponent {
<i class="fa fa-expand-arrows-alt"></i> <i class="fa fa-expand-arrows-alt"></i>
</span>`; </span>`;
if (this.parent.zone === "areas") this.ResultsMap.displayMapAreas();
else this.ResultsMap.displayMapSections();
this.handleDom(); this.handleDom();
} }
...@@ -225,7 +231,6 @@ class ResultZoneComponent { ...@@ -225,7 +231,6 @@ class ResultZoneComponent {
if (this.parent.zone === "areas") { if (this.parent.zone === "areas") {
await this.ResultsFlow.displayFlowAreas(); await this.ResultsFlow.displayFlowAreas();
this.ResultsDetaileds.displayAreasResults(); this.ResultsDetaileds.displayAreasResults();
} else if (this.parent.zone === "sections") { } else if (this.parent.zone === "sections") {
await this.ResultsFlow.displayFlowSections(); await this.ResultsFlow.displayFlowSections();
this.ResultsDetaileds.displaySectionsResults(); this.ResultsDetaileds.displaySectionsResults();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment