@tak-ps/cloudtak 13.47.2 → 13.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -14,6 +14,7 @@ export default class AtlasDatabase {
|
|
|
14
14
|
atlas: Atlas;
|
|
15
15
|
cots: Map<string, COT>;
|
|
16
16
|
archiveIds: Set<string>;
|
|
17
|
+
hydrating?: Promise<void>;
|
|
17
18
|
mission?: string;
|
|
18
19
|
static normalizePath(path: string): string;
|
|
19
20
|
pendingCreate: Map<string, COT>;
|
|
@@ -68,6 +69,18 @@ export default class AtlasDatabase {
|
|
|
68
69
|
* @param poly - GeoJSON Polygon to test CoTs against
|
|
69
70
|
*/
|
|
70
71
|
touching(poly: Polygon): Promise<Set<COT>>;
|
|
72
|
+
/**
|
|
73
|
+
* Hydrate the in-memory store from the local Dexie feature database.
|
|
74
|
+
*
|
|
75
|
+
* Runs at startup instead of loadArchive() so that every feature the
|
|
76
|
+
* client has previously persisted (archived and non-archived alike) is
|
|
77
|
+
* rendered immediately without waiting on a network round-trip. This lets
|
|
78
|
+
* CloudTAK restore its last-known state when refreshed offline or on a
|
|
79
|
+
* degraded connection. The authoritative reconciliation against the
|
|
80
|
+
* server still happens later via loadArchive() during the AtlasSync full
|
|
81
|
+
* sync.
|
|
82
|
+
*/
|
|
83
|
+
hydrate(): Promise<void>;
|
|
71
84
|
/**
|
|
72
85
|
* Load Archived CoTs
|
|
73
86
|
*
|
|
@@ -119,12 +132,16 @@ export default class AtlasDatabase {
|
|
|
119
132
|
* @param opts.skipBroadcast - Don't broadcast the COT on the internal message bus to the UI
|
|
120
133
|
* @param opts.authored - If the COT is authored, append creator information if the CoT is new & potentially add it to a mission
|
|
121
134
|
* @param opts.render - Defaults to true. When false, suppress the Mission_Change_Feature notification that reloads & re-renders the mission overlay. Callers adding many features to a mission at once (eg. a lasso import) should pass false and trigger a single loadMission() when finished.
|
|
135
|
+
* @param opts.skipDatabase - Don't persist a newly created COT back to the Dexie feature table. Used when the feature already originates from that table (eg. startup hydrate) so we avoid a redundant IndexedDB write per feature.
|
|
136
|
+
* @param opts.skipMissionLookup - Don't scan subscribed mission stores when checking for an existing COT. Used when the caller knows the feature is a CONNECTION-origin profile feature (eg. startup hydrate) so we avoid an IndexedDB mission scan per feature.
|
|
122
137
|
*/
|
|
123
138
|
add(feature: InputFeature, opts?: {
|
|
124
139
|
skipSave?: boolean;
|
|
125
140
|
skipBroadcast?: boolean;
|
|
126
141
|
authored?: boolean;
|
|
127
142
|
render?: boolean;
|
|
143
|
+
skipDatabase?: boolean;
|
|
144
|
+
skipMissionLookup?: boolean;
|
|
128
145
|
}): Promise<COT | void>;
|
|
129
146
|
/**
|
|
130
147
|
* Batch variant of add() for importing many features at once (eg. a GeoJSON
|