mirror of
https://github.com/umap-project/umap.git
synced 2025-05-02 21:01:48 +02:00
Compare commits
No commits in common. "488b5882e734acce3d54e94574d38c91d74cded5" and "ed232e59b86b8aa6468e359dec5b78493b408b12" have entirely different histories.
488b5882e7
...
ed232e59b8
2 changed files with 8 additions and 10 deletions
|
@ -1066,14 +1066,12 @@ export class DataLayer extends ServerStored {
|
||||||
),
|
),
|
||||||
async () => {
|
async () => {
|
||||||
// Save again this layer
|
// Save again this layer
|
||||||
const status = await this._trySave(url, {}, formData)
|
await this._trySave(url, {}, formData)
|
||||||
if (status) {
|
this.isDirty = false
|
||||||
this.isDirty = false
|
|
||||||
|
|
||||||
// Call the main save, in case something else needs to be saved
|
// Call the main save, in case something else needs to be saved
|
||||||
// as the conflict stopped the saving flow
|
// as the conflict stopped the saving flow
|
||||||
await this.map.saveAll()
|
await this.map.saveAll()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,19 +17,19 @@ export class SaveManager {
|
||||||
|
|
||||||
add(obj) {
|
add(obj) {
|
||||||
this._queue.add(obj)
|
this._queue.add(obj)
|
||||||
this.updateDOM()
|
this.checkStatus()
|
||||||
}
|
}
|
||||||
|
|
||||||
delete(obj) {
|
delete(obj) {
|
||||||
this._queue.delete(obj)
|
this._queue.delete(obj)
|
||||||
this.updateDOM()
|
this.checkStatus()
|
||||||
}
|
}
|
||||||
|
|
||||||
has(obj) {
|
has(obj) {
|
||||||
return this._queue.has(obj)
|
return this._queue.has(obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDOM() {
|
checkStatus() {
|
||||||
document.body.classList.toggle('umap-is-dirty', this._queue.size)
|
document.body.classList.toggle('umap-is-dirty', this._queue.size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue