diff --git a/src/js/controller/dialogs/importwizard/steps/ImageImport.js b/src/js/controller/dialogs/importwizard/steps/ImageImport.js index cfee1bf7..cde70395 100644 --- a/src/js/controller/dialogs/importwizard/steps/ImageImport.js +++ b/src/js/controller/dialogs/importwizard/steps/ImageImport.js @@ -74,9 +74,9 @@ { importType: this.getImportType_(), frameSizeX: this.getImportType_() === 'single' ? - this.resizeWidth.value : this.sanitizeInputValue_(this.frameSizeX, 1), + this.resizeWidth.value : this.sanitizeInputValue_(this.frameSizeX, 1), frameSizeY: this.getImportType_() === 'single' ? - this.resizeHeight.value : this.sanitizeInputValue_(this.frameSizeY, 1), + this.resizeHeight.value : this.sanitizeInputValue_(this.frameSizeY, 1), frameOffsetX: this.sanitizeInputValue_(this.frameOffsetX, 0), frameOffsetY: this.sanitizeInputValue_(this.frameOffsetY, 0), smoothing: !!this.smoothResize.checked, diff --git a/src/js/service/CurrentColorsService.js b/src/js/service/CurrentColorsService.js index 443e53ae..ec645d3d 100644 --- a/src/js/service/CurrentColorsService.js +++ b/src/js/service/CurrentColorsService.js @@ -83,21 +83,21 @@ batchAll(frames, function (frame) { return this.cachedFrameProcessor.get(frame); }.bind(this)) - .then(function (results) { - var colors = {}; - results.forEach(function (result) { - Object.keys(result).forEach(function (color) { - colors[color] = true; + .then(function (results) { + var colors = {}; + results.forEach(function (result) { + Object.keys(result).forEach(function (color) { + colors[color] = true; + }); }); - }); - // Remove transparent color from used colors - delete colors[pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR)]; + // Remove transparent color from used colors + delete colors[pskl.utils.colorToInt(Constants.TRANSPARENT_COLOR)]; - var hexColors = Object.keys(colors).map(function (color) { - return pskl.utils.intToHex(color); - }); - this.setCurrentColors(hexColors); - }.bind(this)); + var hexColors = Object.keys(colors).map(function (color) { + return pskl.utils.intToHex(color); + }); + this.setCurrentColors(hexColors); + }.bind(this)); }; ns.CurrentColorsService.prototype.isCurrentColorsPaletteSelected_ = function () { diff --git a/src/js/service/ImportService.js b/src/js/service/ImportService.js index c825f0b1..98e2ab46 100644 --- a/src/js/service/ImportService.js +++ b/src/js/service/ImportService.js @@ -97,15 +97,15 @@ * @private */ ns.ImportService.prototype.createImagesFromSheet_ = function (image, - frameSizeX, frameSizeY, frameOffsetX, frameOffsetY) { + frameSizeX, frameSizeY, frameOffsetX, frameOffsetY) { return pskl.utils.CanvasUtils.createFramesFromImage( - image, - frameOffsetX, - frameOffsetY, - frameSizeX, - frameSizeY, - /*useHorizonalStrips=*/ true, - /*ignoreEmptyFrames=*/ true); + image, + frameOffsetX, + frameOffsetY, + frameSizeX, + frameSizeY, + /*useHorizonalStrips=*/ true, + /*ignoreEmptyFrames=*/ true); }; /** @@ -116,7 +116,7 @@ * @private */ ns.ImportService.prototype.createPiskelFromImages_ = function (images, name, - frameSizeX, frameSizeY, smoothing) { + frameSizeX, frameSizeY, smoothing) { name = name || 'Imported piskel'; var frames = this.createFramesFromImages_(images, frameSizeX, frameSizeY, smoothing); var layer = pskl.model.Layer.fromFrames('Layer 1', frames); diff --git a/src/js/utils/FrameUtils.js b/src/js/utils/FrameUtils.js index b91aed5a..3374894b 100644 --- a/src/js/utils/FrameUtils.js +++ b/src/js/utils/FrameUtils.js @@ -259,7 +259,7 @@ for (var j = 0 ; j < row.length ; j++) { context.clearRect(0, 0 , frameWidth, frameHeight); context.drawImage(image, frameWidth * i, frameHeight * j, - frameWidth, frameHeight, 0, 0, frameWidth, frameHeight); + frameWidth, frameHeight, 0, 0, frameWidth, frameHeight); var frame = pskl.utils.FrameUtils.createFromCanvas(canvas, 0, 0, frameWidth, frameHeight); chunkFrames.push({ index : layout[i][j], diff --git a/src/js/utils/Uuid.js b/src/js/utils/Uuid.js index 1c50f2d6..04a3ddd2 100644 --- a/src/js/utils/Uuid.js +++ b/src/js/utils/Uuid.js @@ -3,8 +3,8 @@ var s4 = function () { return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); + .toString(16) + .substring(1); }; ns.Uuid = {