forked from MapComplete/MapComplete
More refactoring, move minimap behind facade
This commit is contained in:
parent
c11ff652b8
commit
d5c1ba4cd1
79 changed files with 1848 additions and 1118 deletions
|
@ -1,11 +1,11 @@
|
|||
import {FeatureSourceForLayer} from "./FeatureSource";
|
||||
import {Utils} from "../../Utils";
|
||||
|
||||
/***
|
||||
* Saves all the features that are passed in to localstorage, so they can be retrieved on the next run
|
||||
*
|
||||
* Technically, more an Actor then a featuresource, but it fits more neatly this ay
|
||||
*/
|
||||
import {FeatureSourceForLayer} from "../FeatureSource";
|
||||
import {Utils} from "../../../Utils";
|
||||
|
||||
export default class LocalStorageSaverActor {
|
||||
public static readonly storageKey: string = "cached-features";
|
||||
|
||||
|
@ -21,7 +21,6 @@ export default class LocalStorageSaverActor {
|
|||
|
||||
try {
|
||||
localStorage.setItem(key, JSON.stringify(features));
|
||||
console.log("Saved ", features.length, "elements to", key)
|
||||
localStorage.setItem(key + "-time", JSON.stringify(now))
|
||||
} catch (e) {
|
||||
console.warn("Could not save the features to local storage:", e)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import FeatureSource from "./FeatureSource";
|
||||
import {UIEventSource} from "../UIEventSource";
|
||||
import State from "../../State";
|
||||
import FeatureSource from "../FeatureSource";
|
||||
import {UIEventSource} from "../../UIEventSource";
|
||||
import State from "../../../State";
|
||||
|
||||
export default class RegisteringAllFromFeatureSourceActor {
|
||||
public readonly features: UIEventSource<{ feature: any; freshness: Date }[]>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue