Clean up whitespace.

This commit is contained in:
Jonathan Puckey 2011-02-28 18:30:08 +01:00
parent 84e31925b6
commit 74f797a9dd
6 changed files with 13 additions and 13 deletions

View file

@ -478,7 +478,7 @@ Item = Base.extend({
while(parent) {
// Find group parents. Check for parent.parent, since don't want
// top level layers, because they also inherit from Group
if(parent.parent
if (parent.parent
&& (parent instanceof Group || parent instanceof CompoundPath)
&& item.isDescendant(parent))
return true;
@ -538,7 +538,7 @@ Item = Base.extend({
// weird results on Scriptographer. Also we can't use antialiasing, since
// Canvas doesn't support it yet. Document colorMode is also out of the
// question for now.
if(!resolution)
if (!resolution)
resolution = 72;
// TODO: use strokebounds for this:
var bounds = this.bounds;

View file

@ -164,7 +164,7 @@ Raster = Item.extend({
var xMin = coords[0], xMax = coords[0];
var yMin = coords[1], yMax = coords[1];
for(var i = 2; i < 8; i += 2) {
for (var i = 2; i < 8; i += 2) {
var x = coords[i];
var y = coords[i + 1];
xMin = Math.min(x, xMin);
@ -184,11 +184,11 @@ Raster = Item.extend({
},
draw: function(ctx, param) {
if(this.blendMode != 'normal' && !param.ignoreBlendMode) {
if (this.blendMode != 'normal' && !param.ignoreBlendMode) {
BlendMode.process(ctx, this, param);
} else {
ctx.save();
if(param.ignoreBlendMode !== true)
if (param.ignoreBlendMode !== true)
this.matrix.applyToContext(ctx);
ctx.drawImage(this._canvas || this._image,
-this.size.width / 2, -this.size.height / 2);

View file

@ -20,10 +20,10 @@ CompoundPath = PathItem.extend(new function() {
},
draw: function(ctx, param) {
if(!this.visible)
if (!this.visible)
return;
if (this.children.length) {
if(this.blendMode != 'normal' && !param.ignoreBlendMode) {
if (this.blendMode != 'normal' && !param.ignoreBlendMode) {
BlendMode.process(ctx, this, param);
} else {
var firstChild = this.children[0];

View file

@ -110,7 +110,7 @@ Path.inject({ statics: new function() {
var three = !(numSides % 3);
var vector = new Point(0, three ? -radius : radius);
var offset = three ? -1 : 0.5;
for(var i = 0; i < numSides; i++) {
for (var i = 0; i < numSides; i++) {
var angle = (360 / numSides) * (i + offset);
path.add(center.add(vector.rotate(angle)));
}

View file

@ -139,11 +139,11 @@ Path = PathItem.extend({
throw new Error('Nesting capacity exceeded in Path#getLenght()');
// Multiply by 3 again, as derivative was divided by 3
var length = 3 * integral;
if(goal == undefined || goal < 0 || goal >= length)
if (goal == undefined || goal < 0 || goal >= length)
return length;
var result = MathUtils.unsimpson(goal, ds, 0, goal / integral,
100 * MathUtils.EPSILON, integral, Math.sqrt(MathUtils.EPSILON), 1);
if(!result)
if (!result)
throw new Error('Nesting capacity exceeded in computing arctime');
return -result.b;
},
@ -408,7 +408,7 @@ Path = PathItem.extend({
draw: function(ctx, param) {
if (!this.visible) return;
if(this.blendMode != 'normal' && !param.ignoreBlendMode) {
if (this.blendMode != 'normal' && !param.ignoreBlendMode) {
BlendMode.process(ctx, this, param);
} else {
param.ignoreBlendMode = false;

View file

@ -6,11 +6,11 @@
CanvasProvider = {
canvases: [],
getCanvas: function(size) {
if(this.canvases.length) {
if (this.canvases.length) {
var canvas = this.canvases.pop();
// If they are not the same size, we don't need to clear them
// using clearRect and visa versa.
if((canvas.width != size.width) || (canvas.height != size.height)) {
if ((canvas.width != size.width) || (canvas.height != size.height)) {
canvas.width = size.width;
canvas.height = size.height;
} else {