mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fix eslint violations
This commit is contained in:
parent
d159de2e65
commit
02a25d3f84
@ -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'
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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++) {
|
||||
|
@ -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) {
|
||||
|
@ -182,7 +182,7 @@
|
||||
var loopCount = 0;
|
||||
var cellCount = frame.getWidth() * frame.getHeight();
|
||||
while (queue.length > 0) {
|
||||
loopCount ++;
|
||||
loopCount++;
|
||||
|
||||
var currentItem = queue.pop();
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user