fix image inversion, slice cancelling

This commit is contained in:
Stewart Allen 2020-04-17 23:24:10 -04:00
commit ee9d363636
2 changed files with 4 additions and 4 deletions

View file

@ -210,9 +210,9 @@ let gs_kiri_sla = exports;
function polyout(poly, ctx) {
poly.forEachPoint((p,i) => {
if (i === 0) {
ctx.moveTo(p.y * scaleY + height2, p.x * scaleX + width2);
ctx.moveTo(height - (p.y * scaleY + height2), p.x * scaleX + width2);
} else {
ctx.lineTo(p.y * scaleY + height2, p.x * scaleX + width2);
ctx.lineTo(height - (p.y * scaleY + height2), p.x * scaleX + width2);
}
}, true);
ctx.closePath();

View file

@ -783,12 +783,12 @@ self.kiri.copyright = exports.COPYRIGHT;
}
// on the last exit, update ui and call the callback
if (--countdown === 0 || error || errored) {
setProgress(0);
if (skipSliceView) {
if (!error) {
if (!(error || errored)) {
preparePrint(callback);
}
} else {
setProgress(0);
showSlices(preserveLayer);
setOpacity(settings.mode === 'CAM' ? color.cam_sliced_opacity : color.sliced_opacity);
if (callback && typeof callback === 'function') {