Fixed rotation bug
authorDmitry Baranovskiy <dmitry.baranovskiy@gmail.com>
Tue, 18 Aug 2009 03:24:11 +0000 (13:24 +1000)
committerDmitry Baranovskiy <dmitry.baranovskiy@gmail.com>
Tue, 18 Aug 2009 03:24:11 +0000 (13:24 +1000)
raphael.js

index 5bd0c35..8f33f82 100644 (file)
@@ -873,7 +873,7 @@ window.Raphael = (function () {
                 },
                 node = o.node,
                 attrs = o.attrs,
-                rot = attrs.rotation,
+                rot = o.attr("rotation"),
                 addDashes = function (o, value) {
                     value = dasharray[(value + "").toLowerCase()];
                     if (value) {
@@ -971,6 +971,7 @@ window.Raphael = (function () {
                         addDashes(o, value);
                         break;
                     case "rotation":
+                        rot = value;
                         o.rotate(value, true);
                         break;
                     case "translation":
@@ -1058,7 +1059,7 @@ window.Raphael = (function () {
             }
             
             tuneText(o, params);
-            o.rotate(attrs.rotation, true);
+            o.rotate(rot, true);
         };
         var leading = 1.2;
         var tuneText = function (el, params) {