forked from MapComplete/MapComplete
Huge refactoring: split readonly and writable stores
This commit is contained in:
parent
0946d8ac9c
commit
4283b76f36
95 changed files with 819 additions and 625 deletions
|
|
@ -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>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue