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:
@ -309,7 +309,8 @@
|
|||||||
var isSeamless = pskl.UserSettings.get(pskl.UserSettings.SEAMLESS_MODE);
|
var isSeamless = pskl.UserSettings.get(pskl.UserSettings.SEAMLESS_MODE);
|
||||||
this.renderer.setRepeated(isSeamless);
|
this.renderer.setRepeated(isSeamless);
|
||||||
|
|
||||||
var height, width;
|
var width;
|
||||||
|
var height;
|
||||||
|
|
||||||
if (isSeamless) {
|
if (isSeamless) {
|
||||||
height = PREVIEW_SIZE;
|
height = PREVIEW_SIZE;
|
||||||
|
@ -85,7 +85,8 @@
|
|||||||
var isTransparent = layers.some(function (l) {return l.isTransparent();});
|
var isTransparent = layers.some(function (l) {return l.isTransparent();});
|
||||||
var preserveColors = !isTransparent && currentColors.length < MAX_GIF_COLORS;
|
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
|
// transparency only supported if preserveColors is true, see Issue #357
|
||||||
if (preserveColors) {
|
if (preserveColors) {
|
||||||
transparentColor = this.getTransparentColor(currentColors);
|
transparentColor = this.getTransparentColor(currentColors);
|
||||||
|
@ -35,7 +35,11 @@
|
|||||||
var evenY = (coords.y0 + coords.y1) % 2;
|
var evenY = (coords.y0 + coords.y1) % 2;
|
||||||
var rX = coords.x1 - xC;
|
var rX = coords.x1 - xC;
|
||||||
var rY = coords.y1 - yC;
|
var rY = coords.y1 - yC;
|
||||||
var x, y, angle, r;
|
|
||||||
|
var x;
|
||||||
|
var y;
|
||||||
|
var angle;
|
||||||
|
var r;
|
||||||
|
|
||||||
if (penSize == 1) {
|
if (penSize == 1) {
|
||||||
for (x = coords.x0 ; x <= xC ; x++) {
|
for (x = coords.x0 ; x <= xC ; x++) {
|
||||||
|
@ -21,7 +21,8 @@
|
|||||||
* every X milliseconds, where X is the provided interval.
|
* every X milliseconds, where X is the provided interval.
|
||||||
*/
|
*/
|
||||||
throttle : function (fn, interval) {
|
throttle : function (fn, interval) {
|
||||||
var last, timer;
|
var last;
|
||||||
|
var timer;
|
||||||
return function () {
|
return function () {
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
if (last && now < last + interval) {
|
if (last && now < last + interval) {
|
||||||
|
@ -92,9 +92,9 @@
|
|||||||
// IE11 specific implementation
|
// IE11 specific implementation
|
||||||
function () {
|
function () {
|
||||||
return document.createElement('div');
|
return document.createElement('div');
|
||||||
}
|
} :
|
||||||
// Normal, sane browsers implementation.
|
// Normal, sane browsers implementation.
|
||||||
: function () {
|
function () {
|
||||||
if (!ns.Template._dummyEl) {
|
if (!ns.Template._dummyEl) {
|
||||||
ns.Template._dummyEl = document.createElement('div');
|
ns.Template._dummyEl = document.createElement('div');
|
||||||
}
|
}
|
||||||
|
@ -227,7 +227,8 @@
|
|||||||
var dimension = slider.dataset.dimension;
|
var dimension = slider.dataset.dimension;
|
||||||
var model = slider.dataset.model;
|
var model = slider.dataset.model;
|
||||||
|
|
||||||
var start, end;
|
var start;
|
||||||
|
var end;
|
||||||
var isHueSlider = dimension === 'h';
|
var isHueSlider = dimension === 'h';
|
||||||
if (!isHueSlider) {
|
if (!isHueSlider) {
|
||||||
var colors = this.getSliderBackgroundColors_(model, dimension);
|
var colors = this.getSliderBackgroundColors_(model, dimension);
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
var ns = $.namespace('pskl.worker.imageprocessor');
|
var ns = $.namespace('pskl.worker.imageprocessor');
|
||||||
|
|
||||||
ns.ImageProcessorWorker = function () {
|
ns.ImageProcessorWorker = function () {
|
||||||
var currentStep, currentProgress, currentTotal;
|
var currentStep;
|
||||||
|
var currentProgress;
|
||||||
|
var currentTotal;
|
||||||
|
|
||||||
var initStepCounter_ = function (total) {
|
var initStepCounter_ = function (total) {
|
||||||
currentStep = 0;
|
currentStep = 0;
|
||||||
|
Reference in New Issue
Block a user