ES5 no-multi-spaces

This commit is contained in:
Amine Ben hammou
2017-09-21 08:47:23 +00:00
parent 680446b77e
commit 33572b2dc7
4 changed files with 4 additions and 5 deletions

View File

@ -18,7 +18,6 @@
"no-prototype-builtins": 0, "no-prototype-builtins": 0,
"no-restricted-syntax": 0, "no-restricted-syntax": 0,
"no-useless-concat": 0, "no-useless-concat": 0,
"no-multi-spaces": 0,
"no-nested-ternary": 0, "no-nested-ternary": 0,
"no-sequences": 0, "no-sequences": 0,
"no-useless-return": 0, "no-useless-return": 0,

View File

@ -57,8 +57,8 @@ define(
// Coerce values. // Coerce values.
if ( coerce ) { if ( coerce ) {
val = val && !isNaN(val) ? +val // number val = val && !isNaN(val) ? +val // number
: val === 'undefined' ? undefined // undefined : val === 'undefined' ? undefined // undefined
: coerce_types[val] !== undefined ? coerce_types[val] // true, false, null : coerce_types[val] !== undefined ? coerce_types[val] // true, false, null
: val; // string : val; // string
} }

View File

@ -71,7 +71,7 @@ define([
// Accurate dimensions can only be taken after insertion to document // Accurate dimensions can only be taken after insertion to document
centerXOffset = $clone.width() / 2; centerXOffset = $clone.width() / 2;
centerYOffset = $clone.height() / 2; centerYOffset = $clone.height() / 2;
$clone.css('top', event.pageY - centerYOffset); $clone.css('top', event.pageY - centerYOffset);
$clone.css('left', event.pageX - centerXOffset); $clone.css('left', event.pageX - centerXOffset);
event.interaction.element = clone; event.interaction.element = clone;

View File

@ -51,7 +51,7 @@ define([
}, },
validate: function () { validate: function () {
// Recursively propagate validation checks to blocks in the tree // Recursively propagate validation checks to blocks in the tree
var invalidBlock = this.get('blocks').find(function (block) { return !block.isValid(); }); var invalidBlock = this.get('blocks').find(function (block) { return !block.isValid(); });
if (invalidBlock) { if (invalidBlock) {
return invalidBlock.validationError; return invalidBlock.validationError;
} }