add spinner

This commit is contained in:
Stewart Allen 2022-01-07 01:18:35 -05:00
commit b456110cbb
5 changed files with 58 additions and 5 deletions

View file

@ -272,6 +272,8 @@
}
});
let pack = true;
// compute tile width / height
output.forEach(function(layerout) {
let min = {w:Infinity, h:Infinity}, max = {w:-Infinity, h:-Infinity}, p;
@ -286,6 +288,7 @@
layerout.w = max.w - min.w;
layerout.h = max.h - min.h;
// shift objects to top/left of w/h bounds
if (pack)
layerout.forEach(function(out) {
p = out.point;
p.x -= min.w;
@ -309,6 +312,7 @@
p = new KIRI.Pack(dw, dh, process.outputTileSpacing).fit(c ,!sort);
}
if (pack)
for (i = 0; i < c.length; i++) {
m = c[i];
m.fit.x += m.w + p.pad;