From d3ed2093ede93543232d8100a0bc8fd2c6d4329a Mon Sep 17 00:00:00 2001 From: Etienne Loupias <eloupias@grandlyon.com> Date: Mon, 16 Dec 2024 11:00:49 +0100 Subject: [PATCH] wip avoid window --- src/app/map/components/map.component.html | 1 + src/app/map/components/map.component.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/map/components/map.component.html b/src/app/map/components/map.component.html index 867ac390c..59ea33075 100644 --- a/src/app/map/components/map.component.html +++ b/src/app/map/components/map.component.html @@ -1,4 +1,5 @@ <div + *ngIf="window" id="map" class="body-wrap" leaflet diff --git a/src/app/map/components/map.component.ts b/src/app/map/components/map.component.ts index 4081dd2f6..f9043374f 100644 --- a/src/app/map/components/map.component.ts +++ b/src/app/map/components/map.component.ts @@ -29,6 +29,7 @@ export class MapComponent implements OnChanges { private readonly maxMobileViewWidth = 980; private currentStructure: Structure; + public window; public map: Map; public mapOptions: MapOptions; public zoomOptions = { animate: true, duration: 0.5 }; @@ -49,6 +50,7 @@ export class MapComponent implements OnChanges { private mapService: MapService, private geoJsonService: GeojsonService, ) { + this.window = null; // window; this.initializeMapOptions(); } @@ -323,7 +325,8 @@ export class MapComponent implements OnChanges { } private get isMobileView(): boolean { - return window.innerWidth <= this.maxMobileViewWidth; + return false; + // return window.innerWidth <= this.maxMobileViewWidth; } private centerLeafletMapOnMarker(markerId: string): void { -- GitLab