Huge refactoring: split readonly and writable stores

This commit is contained in:
Pieter Vander Vennet 2022-06-05 02:24:14 +02:00
parent 0946d8ac9c
commit 4283b76f36
95 changed files with 819 additions and 625 deletions

View file

@ -1,9 +1,9 @@
import {UIEventSource} from "../UIEventSource";
import {Store, UIEventSource} from "../UIEventSource";
import FilteredLayer from "../../Models/FilteredLayer";
import {BBox} from "../BBox";
export default interface FeatureSource {
features: UIEventSource<{ feature: any, freshness: Date }[]>;
features: Store<{ feature: any, freshness: Date }[]>;
/**
* Mainly used for debuging
*/
@ -26,14 +26,14 @@ export interface FeatureSourceForLayer extends FeatureSource {
* A feature source which is aware of the indexes it contains
*/
export interface IndexedFeatureSource extends FeatureSource {
readonly containedIds: UIEventSource<Set<string>>
readonly containedIds: Store<Set<string>>
}
/**
* A feature source which has some extra data about it's state
*/
export interface FeatureSourceState {
readonly sufficientlyZoomed: UIEventSource<boolean>;
readonly runningQuery: UIEventSource<boolean>;
readonly timeout: UIEventSource<number>;
readonly sufficientlyZoomed: Store<boolean>;
readonly runningQuery: Store<boolean>;
readonly timeout: Store<number>;
}