defer/merge saveState calls in some circumstances
This commit is contained in:
parent
1126c24aa1
commit
25740004ef
1 changed files with 8 additions and 0 deletions
|
|
@ -263,6 +263,14 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
|
||||||
};
|
};
|
||||||
|
|
||||||
PRO.saveState = function(ondone) {
|
PRO.saveState = function(ondone) {
|
||||||
|
if (!ondone) {
|
||||||
|
clearTimeout(this._save_timer);
|
||||||
|
this._save_timer = setTimeout(() => {
|
||||||
|
this._save_timer = undefined;
|
||||||
|
this.saveState(() => {});
|
||||||
|
}, 150);
|
||||||
|
return;
|
||||||
|
}
|
||||||
let widget = this;
|
let widget = this;
|
||||||
KIRI.odb.put('ws-save-'+this.id, {
|
KIRI.odb.put('ws-save-'+this.id, {
|
||||||
geo: widget.getGeoVertices(false),
|
geo: widget.getGeoVertices(false),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue