mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: mark synched datalayers as "loaded"
Otherwise, when they will get the "_referenceVersion" later, they will call the server to fetch the data (while they already have the data, from the sync itself)
This commit is contained in:
parent
6caf4c3ed1
commit
dd7641c92e
1 changed files with 4 additions and 1 deletions
|
@ -54,7 +54,10 @@ export class MapUpdater extends BaseUpdater {
|
|||
export class DataLayerUpdater extends BaseUpdater {
|
||||
upsert({ value }) {
|
||||
// Upsert only happens when a new datalayer is created.
|
||||
this._umap.createDataLayer(value, false)
|
||||
const datalayer = this._umap.createDataLayer(value, false)
|
||||
// Prevent the layer to get data from the server, as it will get it
|
||||
// from the sync.
|
||||
datalayer._loaded = true
|
||||
}
|
||||
|
||||
update({ key, metadata, value }) {
|
||||
|
|
Loading…
Reference in a new issue