From ee9d3636366c9ec5869a8e6574a37a2cdc8578dc Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Fri, 17 Apr 2020 23:24:10 -0400 Subject: [PATCH] fix image inversion, slice cancelling --- js/kiri-driver-sla.js | 4 ++-- js/kiri.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/kiri-driver-sla.js b/js/kiri-driver-sla.js index 91052a27..9fbe56e2 100644 --- a/js/kiri-driver-sla.js +++ b/js/kiri-driver-sla.js @@ -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(); diff --git a/js/kiri.js b/js/kiri.js index c7939f26..cc6372e8 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -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') {