From 27ee9d3f705d4aaa2eb7846c46db9feb311e774e Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Mon, 7 Dec 2015 22:40:24 +0100 Subject: [PATCH] add test for rotated object --- test/unit/shadow.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/shadow.js b/test/unit/shadow.js index 3fa28c74..cd91d76c 100644 --- a/test/unit/shadow.js +++ b/test/unit/shadow.js @@ -170,5 +170,15 @@ shadow.color = '#000000'; equal(shadow.toSVG(object), '\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\n\t\n\n'); }); + + test('toSVG with rotated object', function() { + // reset uid + fabric.Object.__uid = 0; + + var shadow = new fabric.Shadow({color: '#FF0000', offsetX: 10, offsetY: 10, blur: 2}); + var object = new fabric.Object({fill: '#FF0000', angle: 45}); + + equal(shadow.toSVG(object), '\n\t\n\t\n\t\n\t\n\t\n\t\t\n\t\t\n\t\n\n'); + }); })();