AW-6046 Angular improvement
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
2024-04-15 10:29:47 +02:00
parent ede75f63f5
commit 84a1a04b19
104 changed files with 592 additions and 796 deletions

View File

@@ -1,17 +1,16 @@
import { Component, OnInit, Input, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
import { IItemLayer } from '../../../models/item.layer';
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { Store } from '@ngrx/store';
import * as mapReducers from '../../../reducers/map.reducer';
import * as mapActions from '../../../actions/map.actions';
import { MapComponent } from 'ng-openlayers';
import { ILayervalue } from '../../../models/layer.value';
import { Observable, interval, Subject } from 'rxjs';
import { debounce, throttle } from 'rxjs/operators';
import { toLonLat } from 'ol/proj';
import { ClipboardService } from 'ngx-clipboard';
import { toStringHDMS } from 'ol/coordinate';
import { ClipboardService } from 'ngx-clipboard'
import { GeoJSON, WKT } from 'ol/format';
import { WKT } from 'ol/format';
import { Point } from 'ol/geom';
import { toLonLat } from 'ol/proj';
import { Observable, Subject, interval } from 'rxjs';
import { throttle } from 'rxjs/operators';
import * as mapActions from '../../../actions/map.actions';
import { ILayervalue } from '../../../models/layer.value';
import * as mapReducers from '../../../reducers/map.reducer';
@Component({
selector: 'fm-map-layer-values',
@@ -45,7 +44,7 @@ export class LayerValuesComponent implements OnInit, AfterViewInit {
this.map.instance.on('moveend', () => {
this.moveEndSubject.next({});
});
this.moveEndSubject.pipe(throttle(ev => interval(100))).subscribe(() => this.updateValuesLocation());
this.moveEndSubject.pipe(throttle(() => interval(100))).subscribe(() => this.updateValuesLocation());
}
updateValuesLocation() {