<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,5 @@
 /*
- * Raphael 0.8.5 - JavaScript Vector Library
+ * Raphael 0.8.6 - JavaScript Vector Library
  *
  * Copyright (c) 2008 - 2009 Dmitry Baranovskiy (http://raphaeljs.com)
  * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
@@ -21,7 +21,7 @@ window.Raphael = (function () {
         availableAttrs = {cx: 0, cy: 0, fill: &quot;#fff&quot;, &quot;fill-opacity&quot;: 1, font: '10px &quot;Arial&quot;', &quot;font-family&quot;: '&quot;Arial&quot;', &quot;font-size&quot;: &quot;10&quot;, &quot;font-style&quot;: &quot;normal&quot;, &quot;font-weight&quot;: 400, gradient: 0, height: 0, href: &quot;http://raphaeljs.com/&quot;, opacity: 1, path: &quot;M0,0&quot;, r: 0, rotation: 0, rx: 0, ry: 0, scale: &quot;1 1&quot;, src: &quot;&quot;, stroke: &quot;#000&quot;, &quot;stroke-dasharray&quot;: &quot;&quot;, &quot;stroke-linecap&quot;: &quot;butt&quot;, &quot;stroke-linejoin&quot;: &quot;butt&quot;, &quot;stroke-miterlimit&quot;: 0, &quot;stroke-opacity&quot;: 1, &quot;stroke-width&quot;: 1, target: &quot;_blank&quot;, &quot;text-anchor&quot;: &quot;middle&quot;, title: &quot;Raphael&quot;, translation: &quot;0 0&quot;, width: 0, x: 0, y: 0},
         availableAnimAttrs = {cx: &quot;number&quot;, cy: &quot;number&quot;, fill: &quot;colour&quot;, &quot;fill-opacity&quot;: &quot;number&quot;, &quot;font-size&quot;: &quot;number&quot;, height: &quot;number&quot;, opacity: &quot;number&quot;, path: &quot;path&quot;, r: &quot;number&quot;, rotation: &quot;csv&quot;, rx: &quot;number&quot;, ry: &quot;number&quot;, scale: &quot;csv&quot;, stroke: &quot;colour&quot;, &quot;stroke-opacity&quot;: &quot;number&quot;, &quot;stroke-width&quot;: &quot;number&quot;, translation: &quot;csv&quot;, width: &quot;number&quot;, x: &quot;number&quot;, y: &quot;number&quot;},
         events = [&quot;click&quot;, &quot;dblclick&quot;, &quot;mousedown&quot;, &quot;mousemove&quot;, &quot;mouseout&quot;, &quot;mouseover&quot;, &quot;mouseup&quot;];
-    R.version = &quot;0.8.5&quot;;
+    R.version = &quot;0.8.6&quot;;
     R.type = (window.SVGAngle || document.implementation.hasFeature(&quot;http://www.w3.org/TR/SVG11/feature#BasicStructure&quot;, &quot;1.1&quot;) ? &quot;SVG&quot; : &quot;VML&quot;);
     R.svg = !(R.vml = R.type == &quot;VML&quot;);
     R.idGenerator = 0;
@@ -384,14 +384,14 @@ window.Raphael = (function () {
                         case &quot;a&quot;:
                             r[1] = pa[1];
                             r[2] = pa[2];
-                            r[3] = 0;
+                            r[3] = pa[3];
                             r[4] = pa[4];
                             r[5] = pa[5];
                             r[6] = +(pa[6] - x).toFixed(3);
                             r[7] = +(pa[7] - y).toFixed(3);
                             break;
                         case &quot;v&quot;:
-                            r[1] = (pa[1] - y).toFixed(3);
+                            r[1] = +(pa[1] - y).toFixed(3);
                             break;
                         default:
                             for (var j = 1, jj = pa.length; j &lt; jj; j++) {
@@ -404,18 +404,19 @@ window.Raphael = (function () {
                         res[i][k] = pa[k];
                     }
                 }
+                var len = res[i].length;
                 switch (res[i][0]) {
                     case &quot;z&quot;:
                         break;
                     case &quot;h&quot;:
-                        x += res[i][res[i].length - 1];
+                        x += +res[i][len - 1];
                         break;
                     case &quot;v&quot;:
-                        y += res[i][res[i].length - 1];
+                        y += +res[i][len - 1];
                         break;
                     default:
-                        x += res[i][res[i].length - 2];
-                        y += res[i][res[i].length - 1];
+                        x += +res[i][len - 2];
+                        y += +res[i][len - 1];
                 }
             }
             res.toString = pathArray.toString;
@@ -810,6 +811,7 @@ window.Raphael = (function () {
             }
         };
         var thePath = function (params, pathString, SVG) {
+            params = params || {};
             var el = doc.createElementNS(SVG.svgns, &quot;path&quot;);
             if (SVG.canvas) {
                 SVG.canvas.appendChild(el);
@@ -1172,7 +1174,13 @@ window.Raphael = (function () {
                 this.show();
                 var hide = true;
             }
-            var bbox = this.node.getBBox() || {};
+            var bbox = {};
+            try {
+                bbox = this.node.getBBox();
+            } catch(e) {
+                // Firefox 3.0.x plays badly here
+                bbox = {};
+            }
             if (this.type == &quot;text&quot;) {
                 bbox = {x: bbox.x, y: Infinity, width: bbox.width, height: 0};
                 for (var i = 0, ii = this.node.getNumberOfChars(); i &lt; ii; i++) {
@@ -1442,23 +1450,23 @@ window.Raphael = (function () {
             arcTo: function (rx, ry, large_arc_flag, sweep_flag, x2, y2) {
                 // for more information of where this math came from visit:
                 // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
-                x2 = (this.isAbsolute ? 0 : this.last.x) + x2 - 1;
-                y2 = (this.isAbsolute ? 0 : this.last.y) + y2 - 1;
-                var x1 = this.last.x - 1,
+                var x22 = (this.isAbsolute ? 0 : this.last.x) + parseFloat(x2) - 1,
+                    y22 = (this.isAbsolute ? 0 : this.last.y) + parseFloat(y2) - 1,
+                    x1 = this.last.x - 1,
                     y1 = this.last.y - 1,
-                    x = (x1 - x2) / 2,
-                    y = (y1 - y2) / 2,
+                    x = (x1 - x22) / 2,
+                    y = (y1 - y22) / 2,
                     k = (large_arc_flag == sweep_flag ? -1 : 1) *
                         Math.sqrt(Math.abs(rx * rx * ry * ry - rx * rx * y * y - ry * ry * x * x) / (rx * rx * y * y + ry * ry * x * x)),
-                    cx = k * rx * y / ry + (x1 + x2) / 2,
-                    cy = k * -ry * x / rx + (y1 + y2) / 2,
+                    cx = k * rx * y / ry + (x1 + x22) / 2,
+                    cy = k * -ry * x / rx + (y1 + y22) / 2,
                     d = sweep_flag ? (this.isAbsolute ? &quot;wa&quot; : &quot;wr&quot;) : (this.isAbsolute ? &quot;at&quot; : &quot;ar&quot;),
                     left = Math.round(cx - rx),
                     top = Math.round(cy - ry);
-                d += [left, top, Math.round(left + rx * 2), Math.round(top + ry * 2), Math.round(x1), Math.round(y1), Math.round(parseFloat(x2)), Math.round(parseFloat(y2))].join(&quot;, &quot;);
+                d += [left, top, Math.round(left + rx * 2), Math.round(top + ry * 2), Math.round(x1), Math.round(y1), Math.round(x22), Math.round(y22)].join(&quot;, &quot;);
                 this.node.path = this.Path += d;
-                this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(x2);
-                this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(y2);
+                this.last.x = (this.isAbsolute ? 0 : this.last.x) + x2;
+                this.last.y = (this.isAbsolute ? 0 : this.last.y) + y2;
                 this.last.isAbsolute = this.isAbsolute;
                 this.attrs.path += (this.isAbsolute ? &quot;A&quot; : &quot;a&quot;) + [rx, ry, 0, large_arc_flag, sweep_flag, x2, y2];
                 return this;
@@ -1556,6 +1564,7 @@ window.Raphael = (function () {
             }
         };
         var thePath = function (params, pathString, VML) {
+            params = params || {};
             var g = createNode(&quot;group&quot;), gl = g.style;
             gl.position = &quot;absolute&quot;;
             gl.left = 0;
@@ -1618,6 +1627,7 @@ window.Raphael = (function () {
             if (params.path &amp;&amp; o.type == &quot;path&quot;) {
                 o.Path = &quot;&quot;;
                 o.path = [];
+                o.attrs.path = &quot;&quot;;
                 paper.pathfinder(o, params.path);
             }
             if (params.rotation != null) {
@@ -1748,9 +1758,9 @@ window.Raphael = (function () {
             gradient = toGradient(gradient);
             o.attrs = o.attrs || {};
             var attrs = o.attrs,
-                fill = o.getElementsByTagName(&quot;fill&quot;);
+                fill = o.node.getElementsByTagName(&quot;fill&quot;);
             o.attrs.gradient = gradient;
-            o = o.shape || o[0];
+            o = o.shape || o.node;
             if (fill.length) {
                 fill = fill[0];
             } else {
@@ -2407,19 +2417,21 @@ window.Raphael = (function () {
         if (x != 0) {
             var bb = this.type == &quot;path&quot; ? pathDimensions(a.path) : this.getBBox(),
                 rcx = bb.x + bb.width / 2,
-                rcy = bb.y + bb.height / 2;
+                rcy = bb.y + bb.height / 2,
+                kx = x / this._.sx,
+                ky = y / this._.sy;
             cx = (+cx || cx == 0) ? cx : rcx;
             cy = (+cy || cy == 0) ? cy : rcy;
             var dirx = Math.round(x / Math.abs(x)),
                 diry = Math.round(y / Math.abs(y)),
                 s = this.node.style,
-                ncx = cx + (rcx - cx) * x * dirx / this._.sx,
-                ncy = cy + (rcy - cy) * y * diry / this._.sy;
+                ncx = cx + (rcx - cx) * dirx * kx,
+                ncy = cy + (rcy - cy) * diry * ky;
             switch (this.type) {
                 case &quot;rect&quot;:
                 case &quot;image&quot;:
-                    var neww = a.width * x * dirx / this._.sx,
-                        newh = a.height * y * diry / this._.sy,
+                    var neww = a.width * dirx * kx,
+                        newh = a.height * diry * ky,
                         newx = ncx - neww / 2,
                         newy = ncy - newh / 2;
                     this.attr({
@@ -2432,9 +2444,9 @@ window.Raphael = (function () {
                 case &quot;circle&quot;:
                 case &quot;ellipse&quot;:
                     this.attr({
-                        rx: a.rx * x / this._.sx,
-                        ry: a.ry * y / this._.sy,
-                        r: a.r * x / this._.sx,
+                        rx: a.rx * kx,
+                        ry: a.ry * ky,
+                        r: a.r * kx,
                         cx: ncx,
                         cy: ncy
                     });
@@ -2450,14 +2462,14 @@ window.Raphael = (function () {
                             skip = false;
                         }
                         if (R.svg &amp;&amp; p[0].toUpperCase() == &quot;A&quot;) {
-                            p[path[i].length - 2] *= x / this._.sx;
-                            p[path[i].length - 1] *= y / this._.sy;
-                            p[1] *= x / this._.sx;
-                            p[2] *= y / this._.sy;
+                            p[path[i].length - 2] *= kx;
+                            p[path[i].length - 1] *= ky;
+                            p[1] *= kx;
+                            p[2] *= ky;
                             p[5] = +(dirx + diry ? !!+p[5] : !+p[5]);
                         } else {
                             for (var j = 1, jj = p.length; j &lt; jj; j++) {
-                                p[j] *= (j % 2) ? x / this._.sx : y / this._.sy;
+                                p[j] *= (j % 2) ? kx : ky;
                             }
                         }
                     }
@@ -2687,7 +2699,7 @@ window.Raphael = (function () {
                 }
                 that.attr(set);
                 that.animation_in_progress = setTimeout(tick);
-                paper.safari();
+                R.svg &amp;&amp; paper.safari();
             } else {
                 (t.x || t.y) &amp;&amp; that.translate(-t.x, -t.y);
                 that.attr(params);
@@ -2708,12 +2720,12 @@ window.Raphael = (function () {
         switch (this.type) {
             case &quot;circle&quot;:
             case &quot;ellipse&quot;:
-                this.attr({cx: this.attrs.cx + x, cy: this.attrs.cy + y});
+                this.attr({cx: +x + this.attrs.cx, cy: +y + this.attrs.cy});
                 break;
             case &quot;rect&quot;:
             case &quot;image&quot;:
             case &quot;text&quot;:
-                this.attr({x: this.attrs.x + (+x), y: this.attrs.y + (+y)});
+                this.attr({x: +x + this.attrs.x, y: +y + this.attrs.y});
                 break;
             case &quot;path&quot;:
                 var path = pathToRelative(this.attrs.path);</diff>
      <filename>raphael.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>380249c66c604660b3a9e4c5bfe0aad5be1ba63a</id>
    </parent>
  </parents>
  <author>
    <name>Dmitry Baranovskiy</name>
    <email>dbaranovskiy@Fresh-Air.sydney.atlassian.com</email>
  </author>
  <url>http://github.com/sophacles/raphael/commit/0303a571e520bb3c3220e6290da220f5a5915119</url>
  <id>0303a571e520bb3c3220e6290da220f5a5915119</id>
  <committed-date>2009-08-10T16:31:04-07:00</committed-date>
  <authored-date>2009-08-10T16:31:04-07:00</authored-date>
  <message>0.8.6
Multiple bug fixes. Fix for FF 3.0.x, IE gradients, animation and arcs.</message>
  <tree>8320053e7e3cb3c7447d2f3a06e5657afc6f4861</tree>
  <committer>
    <name>Dmitry Baranovskiy</name>
    <email>dbaranovskiy@Fresh-Air.sydney.atlassian.com</email>
  </committer>
</commit>
