mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
fix: do not try to restore a newly created layer on reset (#2381)
When asking for cancel, a layer that has not yet been saved to the server should only be erased, no need to try to restore its previous state.
This commit is contained in:
commit
7b59cf4afb
1 changed files with 4 additions and 1 deletions
|
@ -611,7 +611,10 @@ export class DataLayer extends ServerStored {
|
||||||
}
|
}
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
if (!this.createdOnServer) this.erase()
|
if (!this.createdOnServer) {
|
||||||
|
this.erase()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.resetOptions()
|
this.resetOptions()
|
||||||
this.parentPane.appendChild(this.pane)
|
this.parentPane.appendChild(this.pane)
|
||||||
|
|
Loading…
Reference in a new issue