Fix initalisation
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
This commit is contained in:
parent
8d204ce1cd
commit
446d26607c
@ -12,7 +12,7 @@ import * as mapActions from '../../actions/map.actions';
|
||||
import { IMapState} from '../../models/map.state';
|
||||
import { ISelectedFeatures } from '../../models/selected.features';
|
||||
import { IItemLayer } from '../../models/item.layer';
|
||||
import { IQueryState } from '@farmmaps/common';
|
||||
import { IListItem, IQueryState } from '@farmmaps/common';
|
||||
import { IPeriodState } from '../../models/period.state';
|
||||
import {IStyles} from '../../models/style.cache';
|
||||
import { IDroppedFile } from '../aol/file-drop-target/file-drop-target.component';
|
||||
@ -81,6 +81,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
public styles$:Observable<IStyles> = this.store.select(mapReducers.selectGetStyles);
|
||||
private lastUrl = "";
|
||||
private initialized: boolean = false;
|
||||
private rootItems: Observable<IListItem[]> = this.store.select(commonReducers.getRootItems);
|
||||
|
||||
@ViewChild('map') map;
|
||||
|
||||
@ -122,6 +123,11 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
}
|
||||
}
|
||||
});
|
||||
this.rootItems.subscribe((l) => {
|
||||
if(l && l.length>0) {
|
||||
this.store.dispatch(new mapActions.Init());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@HostListener('document:keyup', ['$event'])
|
||||
|
Loading…
Reference in New Issue
Block a user