fix swap axis selection

This commit is contained in:
Stewart Allen 2021-09-07 13:34:02 -04:00
commit 32f7c236a0
2 changed files with 5 additions and 3 deletions

View file

@ -303,10 +303,10 @@
// swap Z axis with least delta axis
let swap = 2;
if (dy < Math.max(dx,dz)) {
if (dy < dx && dy < dz) {
// swap y,z
swap = 1;
} else if (dx < Math.max(dy,dz)) {
} else if (dx < dy && dx < dz) {
// swap x,z
swap = 0;
}

View file

@ -856,8 +856,9 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
function healWidgets() {
let widgets = API.widgets.all();
let marker;
if (widgets.length) {
API.show.alert("Analyzing objects");
marker = API.show.alert("Analyzing objects");
} else {
return;
}
@ -867,6 +868,7 @@ console.log/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
healed++;
}
}
API.hide.alert(marker);
if (healed) {
API.show.alert(`${healed} Object${healed ? 's':''} healed`);
} else {