Autofix indentation issues (eslint --fix)

This commit is contained in:
Marc Jansen
2017-06-19 11:58:00 +02:00
parent a17db4f45c
commit d0ef05977b
196 changed files with 1574 additions and 1574 deletions

View File

@@ -38,19 +38,19 @@ ol.RotationConstraint.none = function(rotation, delta) {
ol.RotationConstraint.createSnapToN = function(n) {
var theta = 2 * Math.PI / n;
return (
/**
/**
* @param {number|undefined} rotation Rotation.
* @param {number} delta Delta.
* @return {number|undefined} Rotation.
*/
function(rotation, delta) {
if (rotation !== undefined) {
rotation = Math.floor((rotation + delta) / theta + 0.5) * theta;
return rotation;
} else {
return undefined;
}
});
function(rotation, delta) {
if (rotation !== undefined) {
rotation = Math.floor((rotation + delta) / theta + 0.5) * theta;
return rotation;
} else {
return undefined;
}
});
};
@@ -61,20 +61,20 @@ ol.RotationConstraint.createSnapToN = function(n) {
ol.RotationConstraint.createSnapToZero = function(opt_tolerance) {
var tolerance = opt_tolerance || ol.math.toRadians(5);
return (
/**
/**
* @param {number|undefined} rotation Rotation.
* @param {number} delta Delta.
* @return {number|undefined} Rotation.
*/
function(rotation, delta) {
if (rotation !== undefined) {
if (Math.abs(rotation + delta) <= tolerance) {
return 0;
} else {
return rotation + delta;
}
function(rotation, delta) {
if (rotation !== undefined) {
if (Math.abs(rotation + delta) <= tolerance) {
return 0;
} else {
return undefined;
return rotation + delta;
}
});
} else {
return undefined;
}
});
};