diff --git a/src/basic/Line.js b/src/basic/Line.js index e9708af9..66b8616b 100644 --- a/src/basic/Line.js +++ b/src/basic/Line.js @@ -39,7 +39,7 @@ var Line = this.Line = Base.extend({ // Epsilon tolerance if (Math.abs(cross) <= 10e-6) return null; - var v = line.point.subtract(this.point) + var v = line.point.subtract(this.point), t1 = v.cross(line.vector) / cross, t2 = v.cross(this.vector) / cross; // Check the ranges of t parameters if the line is not allowed to diff --git a/src/basic/Rectangle.js b/src/basic/Rectangle.js index 4af4ea14..ba4a561e 100644 --- a/src/basic/Rectangle.js +++ b/src/basic/Rectangle.js @@ -310,7 +310,7 @@ var LinkedRectangle = Rectangle.extend({ var internal = '_' + key; this['get' + part] = function() { return this[internal]; - } + }; this['set' + part] = function(value) { this[internal] = value; @@ -318,7 +318,7 @@ var LinkedRectangle = Rectangle.extend({ // _dontNotify, as it will notify itself if (!this._dontNotify) this._owner[this._set](this); - } + }; }, Base.each(['Point', 'Size', 'Center', 'Left', 'Top', 'Right', 'Bottom', 'CenterX', 'CenterY', 'TopLeft', 'TopRight', 'BottomLeft', 'BottomRight', @@ -334,7 +334,7 @@ var LinkedRectangle = Rectangle.extend({ delete this._dontNotify; this._owner[this._set](this); return this; - } + }; }, { beans: true }) ); }); diff --git a/src/color/Gradient.js b/src/color/Gradient.js index 225b19be..f26c4614 100644 --- a/src/color/Gradient.js +++ b/src/color/Gradient.js @@ -20,7 +20,7 @@ var Gradient = this.Gradient = Base.extend({ // TODO: should type here be called 'radial' and have it // receive a boolean value? initialize: function(stops, type) { - if(!stops) { + if (!stops) { stops = [new GradientStop('white', 0), new GradientStop('black', 1)]; } @@ -36,12 +36,12 @@ var Gradient = this.Gradient = Base.extend({ if (stops.length < 2) throw new Error( 'Gradient stop list needs to contain at least two stops.'); - if(!(stops[0] instanceof GradientStop)) { + if (!(stops[0] instanceof GradientStop)) { for(var i = 0, l = stops.length; i < l; i++) { var rampPoint; var stop = stops[i]; // If it is an array, the second argument is the rampPoint: - if(stop.length) { + if (stop.length) { rampPoint = stop[1]; stop = stop[0]; } else { diff --git a/src/item/Layer.js b/src/item/Layer.js index 6a41c2a3..846a85df 100644 --- a/src/item/Layer.js +++ b/src/item/Layer.js @@ -66,7 +66,7 @@ var Layer = this.Layer = Group.extend({ } else { return this.base(item); } - } + }; } return { diff --git a/src/item/Raster.js b/src/item/Raster.js index f6625d92..e8cf58c9 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -67,7 +67,7 @@ var Raster = this.Raster = Item.extend({ * Pixels per inch of the raster at it's current size. */ getPpi: function() { - var matrix = this.matrix; + var matrix = this.matrix, orig = new Point(0, 0).transform(matrix), u = new Point(1, 0).transform(matrix).subtract(orig), v = new Point(0, 1).transform(matrix).subtract(orig); diff --git a/src/path/Curve.js b/src/path/Curve.js index 19586fde..6f753223 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -278,7 +278,7 @@ var Curve = this.Curve = Base.extend({ case 2: // normal // Simply use the derivation of the bezier function for both // the x and y coordinates: - x = (3 * ax * t + 2 * bx) * t + cx, + x = (3 * ax * t + 2 * bx) * t + cx; y = (3 * ay * t + 2 * by) * t + cy; break; } @@ -304,7 +304,7 @@ var Curve = this.Curve = Base.extend({ var dx = (ax * t + bx) * t + cx, dy = (ay * t + by) * t + cy; return Math.sqrt(dx * dx + dy * dy); - } + }; } // Amount of integral evaluations for the interval 0 <= a < b <= 1 diff --git a/src/path/CurveLocation.js b/src/path/CurveLocation.js index adb17b69..54d8f5fa 100644 --- a/src/path/CurveLocation.js +++ b/src/path/CurveLocation.js @@ -139,6 +139,6 @@ CurveLocation = Base.extend({ var parameter = this.getParameter(); if (parameter != null) parts.push('parameter: ' + parameter); - return '{ ' + parts.join(', ') + ' }' + return '{ ' + parts.join(', ') + ' }'; } }); diff --git a/src/ui/Key.js b/src/ui/Key.js index b3cda918..512e43b0 100644 --- a/src/ui/Key.js +++ b/src/ui/Key.js @@ -59,7 +59,7 @@ var Key = new function() { event.returnValue = false; } } - } + }; var res = paper.tool[toolHandler](keyEvent); // TODO: Port to Scriptographer: // When the handler function returns false, prevent the