From 282ad498b636822da12ef9bd0b3f9bfbcc5c0751 Mon Sep 17 00:00:00 2001 From: h3lls Date: Wed, 3 Apr 2019 15:56:54 -0700 Subject: [PATCH] Added zero padding for the PNG files within the zip --- js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 416f74f..fec99a5 100644 --- a/js/main.js +++ b/js/main.js @@ -184,7 +184,7 @@ function getSlice(layerNumber) { sliceImage(dataURL); if (PNGExport) { - var fileName = layerNumber + '.png'; + var fileName = layerNumber.toString().padStart(4, '0') + '.png'; var imgData = dataURL.substr(dataURL.indexOf(',') + 1); zipFolder.file(fileName, imgData, { base64: true }); }