diff --git a/src/shapes/circle.class.js b/src/shapes/circle.class.js index ab89ad6f8ae..6134f7d6194 100644 --- a/src/shapes/circle.class.js +++ b/src/shapes/circle.class.js @@ -114,7 +114,7 @@ '" transform="', this.getSvgTransform(), ' ', this.getSvgTransformMatrix(), '"', this.addPaintOrder(), - '"/>\n' + '/>\n' ); } diff --git a/test/unit/circle.js b/test/unit/circle.js index a6b9e5932ba..73f5f0e5c9e 100644 --- a/test/unit/circle.js +++ b/test/unit/circle.js @@ -137,6 +137,20 @@ assert.deepEqual(circle.toObject(), augmentedProperties); }); + QUnit.test('toSVG with full circle', function(assert) { + var circle = new fabric.Circle({ width: 100, height: 100, radius: 10 }); + var svg = circle.toSVG(); + + assert.equal(svg, '\n'); + }); + + QUnit.test('toSVG with half circle', function(assert) { + var circle = new fabric.Circle({ width: 100, height: 100, radius: 10, endAngle: Math.PI }); + var svg = circle.toSVG(); + + assert.equal(svg, '\n'); + }); + QUnit.test('fromElement', function(assert) { assert.ok(typeof fabric.Circle.fromElement === 'function');