diff --git a/src/svg/SvgExporter.js b/src/svg/SvgExporter.js index 556ab3eb..f0871351 100644 --- a/src/svg/SvgExporter.js +++ b/src/svg/SvgExporter.js @@ -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); diff --git a/src/svg/SvgImporter.js b/src/svg/SvgImporter.js index 6a59fbdf..86f86068 100644 --- a/src/svg/SvgImporter.js +++ b/src/svg/SvgImporter.js @@ -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; diff --git a/test/tests/SvgExporter.js b/test/tests/SvgExporter.js index 16201009..ca47827e 100644 --- a/test/tests/SvgExporter.js +++ b/test/tests/SvgExporter.js @@ -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]); } diff --git a/test/tests/SvgImporter.js b/test/tests/SvgImporter.js index d4a5adae..36095911 100644 --- a/test/tests/SvgImporter.js +++ b/test/tests/SvgImporter.js @@ -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]); }