move tab/support annotations into widget meta data / idb. fix support/lay flat conflict. fix support nozzle in slice.

This commit is contained in:
Stewart Allen 2021-10-18 23:36:19 -04:00
commit bf51d56bb5
12 changed files with 92 additions and 42 deletions

View file

@ -521,6 +521,18 @@
}
let xpdebug;
let supsave = {};
let suptimer;
function scheduleSupportSave(widget) {
clearTimeout(suptimer);
supsave[widget.id] = widget;
suptimer = setTimeout(() => {
for (let w of Object.values(supsave)) {
w.saveState();
}
}, 50);
}
function activeSupports() {
const active = [];
@ -554,6 +566,7 @@
pos.box.pillar = Object.assign({widget}, pos);
sups[id] = pos;
widget.adds.push(pos.box);
scheduleSupportSave(widget);
}
return sups[id];
}
@ -572,6 +585,7 @@
});
sa.splice(ix,1);
API.conf.save();
scheduleSupportSave(widget);
fromPillar = undefined;
}
@ -604,6 +618,7 @@
});
widget.sups = {};
delete API.widgets.annotate(widget.id).support;
scheduleSupportSave(widget);
return cleared;
}