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