This commit is contained in:
Willem Dantuma
2020-02-05 14:57:12 +01:00
parent 1bec8c2038
commit 4eb10aa676
5 changed files with 13 additions and 20 deletions

View File

@@ -181,19 +181,20 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
newQueryState = tassign(mapReducers.initialQueryState);
if (queryState != "") {
newQueryState = this.serializeService.deserialize(queryState);
queryState = this.serializeService.serialize(newQueryState);
}
queryStateChanged = this.lastQueryState != queryState;
queryStateChanged = this.lastQueryState != queryState;
this.lastQueryState = queryState;
}
if (mapStateChanged && queryStateChanged) {
//console.log("Both states");
console.debug("Both states");
this.store.dispatch(new mapActions.SetState(newMapState, newQueryState));
} else if (mapStateChanged) {
//console.log("Map state");
console.debug("Map state");
this.store.dispatch(new mapActions.SetMapState(newMapState));
} else if (queryStateChanged) {
//console.log("Query state");
console.debug("Query state");
this.store.dispatch(new mapActions.SetQueryState(newQueryState));
}
this.stateSetCount += 1;