From a71276440140b6b04f1e50eb3ab423a57d12d668 Mon Sep 17 00:00:00 2001 From: Matt D Date: Wed, 23 Mar 2016 21:50:43 +1100 Subject: [PATCH] Syntax changes to meet code style --- .../settings/exportimage/PngExportController.js | 12 ++++++------ src/js/utils/StringUtils.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/js/controller/settings/exportimage/PngExportController.js b/src/js/controller/settings/exportimage/PngExportController.js index 17e90e9f..e9ba4c27 100644 --- a/src/js/controller/settings/exportimage/PngExportController.js +++ b/src/js/controller/settings/exportimage/PngExportController.js @@ -58,12 +58,12 @@ }; ns.PngExportController.prototype.mergedExport_ = function (zip) { - var paddingLength = (""+this.piskelController.getFrameCount()).length; + var paddingLength = ('' + this.piskelController.getFrameCount()).length; for (var i = 0; i < this.piskelController.getFrameCount(); i++) { var frame = this.piskelController.getFrameAt(i); var canvas = this.getFrameAsCanvas_(frame); var basename = this.pngFilePrefixInput.value; - var id = pskl.utils.StringUtils.leftPad(i, paddingLength, "0"); + var id = pskl.utils.StringUtils.leftPad(i, paddingLength, '0'); var filename = basename + id + '.png'; zip.file(filename, pskl.utils.CanvasUtils.getBase64FromCanvas(canvas) + '\n', {base64: true}); } @@ -71,16 +71,16 @@ ns.PngExportController.prototype.splittedExport_ = function (zip) { var layers = this.piskelController.getLayers(); - var framePaddingLength = (""+this.piskelController.getFrameCount()).length; - var layerPaddingLength = (""+layers.length).length; + var framePaddingLength = ('' + this.piskelController.getFrameCount()).length; + var layerPaddingLength = ('' + layers.length).length; for (var j = 0; this.piskelController.hasLayerAt(j); j++) { var layer = this.piskelController.getLayerAt(j); - var layerid = pskl.utils.StringUtils.leftPad(j, layerPaddingLength, "0"); + var layerid = pskl.utils.StringUtils.leftPad(j, layerPaddingLength, '0'); for (var i = 0; i < this.piskelController.getFrameCount(); i++) { var frame = layer.getFrameAt(i); var canvas = this.getFrameAsCanvas_(frame); var basename = this.pngFilePrefixInput.value; - var frameid = pskl.utils.StringUtils.leftPad(i + 1, framePaddingLength, "0"); + var frameid = pskl.utils.StringUtils.leftPad(i + 1, framePaddingLength, '0'); var filename = 'l' + layerid + '_' + basename + frameid + '.png'; zip.file(filename, pskl.utils.CanvasUtils.getBase64FromCanvas(canvas) + '\n', {base64: true}); } diff --git a/src/js/utils/StringUtils.js b/src/js/utils/StringUtils.js index 75fb55a6..ec1f4f3a 100644 --- a/src/js/utils/StringUtils.js +++ b/src/js/utils/StringUtils.js @@ -6,5 +6,5 @@ var padding = new Array(length).join(pad); return (padding + input).slice(-length); }, - } + }; })();