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,10 +1,10 @@
import { Component, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import {IItemLayer} from '../../models/item.layer';
import { Component, OnChanges, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import * as mapReducers from '../../reducers/map.reducer';
import * as mapActions from '../../actions/map.actions';
import {createEmpty,extend } from 'ol/extent';
import { createEmpty, extend } from 'ol/extent';
import { Observable } from 'rxjs';
import * as mapActions from '../../actions/map.actions';
import { IItemLayer } from '../../models/item.layer';
import * as mapReducers from '../../reducers/map.reducer';
@Component({
selector: 'fm-map-layer-switcher',
@@ -32,11 +32,9 @@ export class LayerSwitcher implements OnInit,OnChanges{
this.showLayerSwitcher = this.store.select(mapReducers.selectGetShowLayerSwitcher);
}
ngOnChanges(changes: SimpleChanges) {
ngOnChanges() {
}
handleClick(event:Event) {
event.stopPropagation();
this.store.dispatch(new mapActions.ShowLayerSwitcher(true));
@@ -47,8 +45,6 @@ export class LayerSwitcher implements OnInit,OnChanges{
this.store.dispatch(new mapActions.ShowLayerSwitcher(false));
}
handleOnToggleVisibility(itemLayer: IItemLayer) {
this.store.dispatch(new mapActions.SetVisibility(itemLayer,!itemLayer.visible));
}