fix multi-widget load grouping, reload same file with import

This commit is contained in:
Stewart Allen 2023-01-14 10:57:32 -05:00
commit ae03abb547
3 changed files with 6 additions and 2 deletions

View file

@ -2180,6 +2180,7 @@ gapp.register("kiri.init", [], (root, exports) => {
ui.load.onchange = function(event) {
api.platform.load_files(event.target.files);
ui.load.value = ''; // reset so you can re-import the same filee
};
ui.sliderMin.onclick = () => {

View file

@ -725,7 +725,9 @@ function platformLoadFiles(files, group) {
reader.file = files[i];
reader.onloadend = function(e) {
function load_dec() {
if (--loaded === 0) platform.group_done(isgcode);
if (--loaded === 0) {
platform.group_done(isgcode);
}
}
if (israw) {
platform.add(

View file

@ -80,7 +80,8 @@ class Widget {
z: 0
},
top: 0, // z top
mirror: false
mirror: false,
indexed: false
},
// used to cache shadow geo
this.cache = {};