AW-2714
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -82,9 +82,17 @@ export function LocalStorageSync(reducer: ActionReducer<any>): ActionReducer<any
|
||||
if(ms) {
|
||||
r2["mapState"] = JSON.parse(ms);
|
||||
}
|
||||
let sp = window.localStorage.getItem(MODULE_NAME+"_searchPeriod");
|
||||
if(sp) {
|
||||
let p = JSON.parse(sp);
|
||||
r2["period"] = { startDate: new Date(Date.parse(p.startDate)),endDate:new Date(Date.parse(p.endDate))};
|
||||
}
|
||||
}
|
||||
if(action.type == "[Map] MapState" || action.type == "[Map] SetState") {
|
||||
window.localStorage.setItem(MODULE_NAME + "_mapState",JSON.stringify(r2["mapState"]));
|
||||
window.localStorage.setItem(MODULE_NAME + "_mapState",JSON.stringify(r2["mapState"]));
|
||||
}
|
||||
if(action.type == "[Map] SetPeriod" ) {
|
||||
window.localStorage.setItem(MODULE_NAME + "_searchPeriod",JSON.stringify(r2["period"]));
|
||||
}
|
||||
|
||||
return r2;
|
||||
|
Reference in New Issue
Block a user