Fix lost styling after navigation
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma 2020-02-17 10:23:17 +01:00
parent 81ed89b240
commit fd28af2f6c

View File

@ -123,7 +123,6 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
} }
ngOnInit() { ngOnInit() {
this.store.dispatch(new mapActions.Init());
this.selectedFeatures$.next({x:0,y:0,features:[]}); this.selectedFeatures$.next({x:0,y:0,features:[]});
this.mapState$ = this.store.select(mapReducers.selectGetMapState); this.mapState$ = this.store.select(mapReducers.selectGetMapState);
this.parentCode$ = this.store.select(mapReducers.selectGetParentCode); this.parentCode$ = this.store.select(mapReducers.selectGetParentCode);
@ -183,6 +182,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
private lastQueryState: string = this.serializeService.serialize(mapReducers.initialQueryState); private lastQueryState: string = this.serializeService.serialize(mapReducers.initialQueryState);
private lastMapState: string = ""; private lastMapState: string = "";
ngAfterViewInit() { ngAfterViewInit() {
this.store.dispatch(new mapActions.Init());
this.paramSub = this.route.paramMap.subscribe((params: ParamMap) => { this.paramSub = this.route.paramMap.subscribe((params: ParamMap) => {
//console.log("Param sub"); //console.log("Param sub");
var newMapState: IMapState = null; var newMapState: IMapState = null;