mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
build: upgrade to angular v12
This commit is contained in:
@@ -24,7 +24,6 @@ import {Point, Polygon} from 'geojson';
|
||||
import {divIcon, geoJSON, icon, LatLng, Map, marker, Marker} from 'leaflet';
|
||||
import {DataProvider} from '../data/data.provider';
|
||||
import {MapPosition, PositionService} from './position.service';
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
/**
|
||||
* Provides methods for presenting the map
|
||||
@@ -91,7 +90,7 @@ export class MapProvider {
|
||||
static invalidateWhenRendered = (
|
||||
map: Map,
|
||||
element: ElementRef,
|
||||
interval: Timeout,
|
||||
interval: number,
|
||||
) => {
|
||||
if (element.nativeElement.offsetWidth === 0) {
|
||||
return;
|
||||
|
||||
@@ -50,7 +50,6 @@ import {
|
||||
} from '../position.service';
|
||||
import {MapListModalComponent} from './modals/map-list-modal.component';
|
||||
import {MapSingleModalComponent} from './modals/map-single-modal.component';
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
/**
|
||||
* The main page of the map
|
||||
@@ -324,7 +323,7 @@ export class MapPageComponent {
|
||||
*/
|
||||
async onMapReady(map: Map) {
|
||||
this.map = map;
|
||||
const interval: Timeout = setInterval(() =>
|
||||
const interval = window.setInterval(() =>
|
||||
MapProvider.invalidateWhenRendered(map, this.mapContainer, interval),
|
||||
);
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import {Component, ElementRef, Input, OnInit, ViewChild} from '@angular/core';
|
||||
import {SCPlace} from '@openstapps/core';
|
||||
import {geoJSON, Map, MapOptions, tileLayer} from 'leaflet';
|
||||
import {MapProvider} from '../map.provider';
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
/**
|
||||
* The map widget (needs a container with explicit size)
|
||||
@@ -77,7 +76,7 @@ export class MapWidgetComponent implements OnInit {
|
||||
*/
|
||||
onMapReady(map: Map) {
|
||||
this.map = map;
|
||||
const interval: Timeout = setInterval(() => {
|
||||
const interval = window.setInterval(() => {
|
||||
MapProvider.invalidateWhenRendered(map, this.mapContainer, interval);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user