From 5532e91080add13102ff214251c1b39e89b91822 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Fri, 3 Nov 2017 15:56:32 -0400 Subject: [PATCH] fix phantom empty top print layer --- js/kiri.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/kiri.js b/js/kiri.js index fe9ae93a..0b335710 100644 --- a/js/kiri.js +++ b/js/kiri.js @@ -661,9 +661,10 @@ self.kiri.license = exports.LICENSE; } else { forWidgets(function(widget) { if (!widget.slices) return; - max = Math.max(max, widget.slices.length - 1); + max = Math.max(max, widget.slices.length); }); } + max = Math.max(0, max - 1); showLayerMax = max; if (UI.layerID.convert() > max || showLayerValue > max) { showLayerValue = max;