More refactoring
This commit is contained in:
@@ -252,14 +252,14 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
queryStateChanged = this.serializeService.serialize(state.queryState) != this.serializeService.serialize(urlQueryState);
|
||||
}
|
||||
|
||||
if(queryStateChanged || mapStateChanged) {
|
||||
if(queryStateChanged && mapStateChanged && state.setStateCount ==0) {
|
||||
return of(new mapActions.SetState(newMapState,newQueryState));
|
||||
} else {
|
||||
return of(null);
|
||||
}
|
||||
window.localStorage.setItem("FarmMapsCommonMap_mapState",this.serializeMapState(newMapState));
|
||||
} else if(queryStateChanged) {
|
||||
return of(new mapActions.SetQueryState(newQueryState));
|
||||
} return of(null)
|
||||
})).subscribe((action) => {
|
||||
if(action) {
|
||||
window.localStorage.setItem("FarmMapsCommonMap_mapState",this.serializeMapState(action.mapState));
|
||||
if(action) {
|
||||
console.debug("Url to state");
|
||||
this.store.dispatch(action);
|
||||
}
|
||||
@@ -353,6 +353,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
}
|
||||
|
||||
handleOnMouseDown(event: MouseEvent) {
|
||||
event.stopPropagation();
|
||||
this.zone.run(() =>{
|
||||
this.store.dispatch(new mapActions.CollapseSearch());
|
||||
});
|
||||
|
Reference in New Issue
Block a user