Change for-loops format.

This commit is contained in:
Jürg Lehni 2012-11-02 18:22:38 -07:00
parent b284a42a56
commit c2ac16a481
4 changed files with 17 additions and 17 deletions

View file

@ -114,7 +114,7 @@ var SvgExporter = this.SvgExporter = /** @Lends SvgExporter */{
pointArray = [];
handleInArray = [];
handleOutArray = [];
for (i = 0; i < segArray.length; i++) {
for (var i = 0; i < segArray.length; i++) {
pointArray[i] = segArray[i].getPoint();
handleInArray[i] = segArray[i].getHandleIn();
handleOutArray[i] = segArray[i].getHandleOut();
@ -180,7 +180,7 @@ var SvgExporter = this.SvgExporter = /** @Lends SvgExporter */{
case 'polyline':
svg = this.create('polyline');
var pointString = '';
for(i = 0; i < pointArray.length; ++i) {
for(var i = 0; i < pointArray.length; i++) {
pointString += pointArray[i].getX() + ',' + pointArray[i].getY() + ' ';
}
svg.setAttribute('points', pointString);
@ -188,7 +188,7 @@ var SvgExporter = this.SvgExporter = /** @Lends SvgExporter */{
case 'polygon':
svg = this.create('polygon');
var pointString = '';
for(i = 0; i < pointArray.length; ++i) {
for(i = 0; i < pointArray.length; i++) {
pointString += pointArray[i].getX() + ',' + pointArray[i].getY() + ' ';
}
svg.setAttribute('points', pointString);

View file

@ -206,7 +206,7 @@ var SvgImporter = this.SvgImporter = /** @Lends SvgImporter */{
var controlPoint;
var prevCommand;
var segmentTo;
for (var i = 0; i < segments.numberOfItems; ++i) {
for (var i = 0; i < segments.numberOfItems; i++) {
segment = segments.getItem(i);
if (segment.pathSegType == SVGPathSeg.PATHSEG_UNKNOWN) {
continue;
@ -301,7 +301,7 @@ var SvgImporter = this.SvgImporter = /** @Lends SvgImporter */{
var point;
poly.moveTo([start.x, start.y]);
for (var i = 1; i < points.length; ++i) {
for (var i = 1; i < points.length; i++) {
point = points.getItem(i);
poly.lineTo([point.x, point.y]);
}
@ -323,7 +323,7 @@ var SvgImporter = this.SvgImporter = /** @Lends SvgImporter */{
var name,
value,
cssName;
for (var i = 0; i < svg.style.length; ++i) {
for (var i = 0; i < svg.style.length; i++) {
name = svg.style[i];
cssName = name.replace(/-(.)/g, function(match, p) {
return p.toUpperCase();
@ -331,7 +331,7 @@ var SvgImporter = this.SvgImporter = /** @Lends SvgImporter */{
value = svg.style[cssName];
this._applyAttributeOrStyle(name, value, item, svg);
}
for (var i = 0; i < svg.attributes.length; ++i) {
for (var i = 0; i < svg.attributes.length; i++) {
name = svg.attributes[i].name;
value = svg.attributes[i].value;
this._applyAttributeOrStyle(name, value, item, svg);
@ -412,7 +412,7 @@ var SvgImporter = this.SvgImporter = /** @Lends SvgImporter */{
case 'font':
var text = document.createElement('span');
text.style.font = value;
for (var i = 0; i < text.style.length; ++i) {
for (var i = 0; i < text.style.length; i++) {
var n = text.style[i];
this._applyAttributeOrStyle(n, text.style[n], item, svg);
}
@ -440,7 +440,7 @@ var SvgImporter = this.SvgImporter = /** @Lends SvgImporter */{
var transform;
var matrix = new Matrix();
for (var i = 0; i < transforms.numberOfItems; ++i) {
for (var i = 0; i < transforms.numberOfItems; i++) {
transform = transforms.getItem(i);
if (transform.type == SVGTransform.SVG_TRANSFORM_UNKNOWN) {
continue;

View file

@ -432,7 +432,7 @@ test('compare polygon values', function() {
var point;
poly.moveTo([start.x, start.y]);
for (var i = 1; i < points.length; ++i) {
for (var i = 1; i < points.length; i++) {
point = points.getItem(i);
poly.lineTo([point.x, point.y]);
}
@ -462,7 +462,7 @@ test('compare negative polygon values', function() {
var point;
poly.moveTo([start.x, start.y]);
for (var i = 1; i < points.length; ++i) {
for (var i = 1; i < points.length; i++) {
point = points.getItem(i);
poly.lineTo([point.x, point.y]);
}
@ -492,7 +492,7 @@ test('compare polyline values', function() {
var point;
poly.moveTo([start.x, start.y]);
for (var i = 1; i < points.length; ++i) {
for (var i = 1; i < points.length; i++) {
point = points.getItem(i);
poly.lineTo([point.x, point.y]);
}
@ -522,7 +522,7 @@ test('compare negative polyline values', function() {
var point;
poly.moveTo([start.x, start.y]);
for (var i = 1; i < points.length; ++i) {
for (var i = 1; i < points.length; i++) {
point = points.getItem(i);
poly.lineTo([point.x, point.y]);
}

View file

@ -335,7 +335,7 @@ test('compare polygon values', function() {
var point;
poly.moveTo([start.x, start.y]);
for (var i = 1; i < points.length; ++i) {
for (var i = 1; i < points.length; i++) {
point = points.getItem(i);
poly.lineTo([point.x, point.y]);
}
@ -360,7 +360,7 @@ test('compare negative polygon values', function() {
var point;
poly.moveTo([start.x, start.y]);
for (var i = 1; i < points.length; ++i) {
for (var i = 1; i < points.length; i++) {
point = points.getItem(i);
poly.lineTo([point.x, point.y]);
}
@ -385,7 +385,7 @@ test('compare polyline values', function() {
var point;
poly.moveTo([start.x, start.y]);
for (var i = 1; i < points.length; ++i) {
for (var i = 1; i < points.length; i++) {
point = points.getItem(i);
poly.lineTo([point.x, point.y]);
}
@ -410,7 +410,7 @@ test('compare negative polyline values', function() {
var point;
poly.moveTo([start.x, start.y]);
for (var i = 1; i < points.length; ++i) {
for (var i = 1; i < points.length; i++) {
point = points.getItem(i);
poly.lineTo([point.x, point.y]);
}