Fix eslint violations

This commit is contained in:
Julian Descottes 2017-06-09 10:26:53 +02:00
parent d159de2e65
commit 02a25d3f84
9 changed files with 26 additions and 16 deletions

View File

@ -70,7 +70,7 @@
if (isBigger && keep) {
anchorInfo.innerHTML = [
'<span class="import-resize-warning">',
'Imported content will be cropped!',
' Imported content will be cropped!',
'</span>',
' ',
'Select crop origin'

View File

@ -309,7 +309,8 @@
var isSeamless = pskl.UserSettings.get(pskl.UserSettings.SEAMLESS_MODE);
this.renderer.setRepeated(isSeamless);
var height, width;
var width;
var height;
if (isSeamless) {
height = PREVIEW_SIZE;

View File

@ -85,7 +85,8 @@
var isTransparent = layers.some(function (l) {return l.isTransparent();});
var preserveColors = !isTransparent && currentColors.length < MAX_GIF_COLORS;
var transparentColor, transparent;
var transparentColor;
var transparent;
// transparency only supported if preserveColors is true, see Issue #357
if (preserveColors) {
transparentColor = this.getTransparentColor(currentColors);

View File

@ -35,7 +35,11 @@
var evenY = (coords.y0 + coords.y1) % 2;
var rX = coords.x1 - xC;
var rY = coords.y1 - yC;
var x, y, angle, r;
var x;
var y;
var angle;
var r;
if (penSize == 1) {
for (x = coords.x0 ; x <= xC ; x++) {

View File

@ -21,7 +21,8 @@
* every X milliseconds, where X is the provided interval.
*/
throttle : function (fn, interval) {
var last, timer;
var last;
var timer;
return function () {
var now = Date.now();
if (last && now < last + interval) {

View File

@ -182,7 +182,7 @@
var loopCount = 0;
var cellCount = frame.getWidth() * frame.getHeight();
while (queue.length > 0) {
loopCount ++;
loopCount++;
var currentItem = queue.pop();

View File

@ -90,15 +90,15 @@
_getDummyEl : pskl.utils.UserAgent.isIE11 ?
// IE11 specific implementation
function () {
return document.createElement('div');
}
function () {
return document.createElement('div');
} :
// Normal, sane browsers implementation.
: function () {
if (!ns.Template._dummyEl) {
ns.Template._dummyEl = document.createElement('div');
}
return ns.Template._dummyEl;
function () {
if (!ns.Template._dummyEl) {
ns.Template._dummyEl = document.createElement('div');
}
return ns.Template._dummyEl;
}
};
})();

View File

@ -227,7 +227,8 @@
var dimension = slider.dataset.dimension;
var model = slider.dataset.model;
var start, end;
var start;
var end;
var isHueSlider = dimension === 'h';
if (!isHueSlider) {
var colors = this.getSliderBackgroundColors_(model, dimension);

View File

@ -2,7 +2,9 @@
var ns = $.namespace('pskl.worker.imageprocessor');
ns.ImageProcessorWorker = function () {
var currentStep, currentProgress, currentTotal;
var currentStep;
var currentProgress;
var currentTotal;
var initStepCounter_ = function (total) {
currentStep = 0;