<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>public/demo.html</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -10,8 +10,9 @@ var Metalpoint = (function () {
             this.dragging.dx = x;
             this.dragging.dy = y;
         },
-        setDrag: function (obj) {
-            this.dragging = {obj: obj, dx: window.event.clientX, dy: window.event.clientY};
+        setDrag: function (obj, e) {
+            var e = e || window.event;
+            this.dragging = {obj: obj, dx: e.clientX, dy: e.clientY};
         },
 
         attrs: {
@@ -48,7 +49,7 @@ var Metalpoint = (function () {
             this.translate(dx, dy);
         };
 
-        pt.disc.mousedown(function (e) { mp.setDrag(pt); });
+        pt.disc.mousedown(function (e) { mp.setDrag(pt, e); });
 
         pt.disc.dblclick(function () {
             if(pt.children.length &gt; 1) {
@@ -110,7 +111,7 @@ var Metalpoint = (function () {
             return Math.sqrt(Math.pow(this.x-this.ox,2) + Math.pow(this.y-this.oy,2))
         }
 
-        handle.disc.mousedown(function (e) { mp.setDrag(handle); });
+        handle.disc.mousedown(function (e) { mp.setDrag(handle, e); });
 
         return handle;
     },
@@ -125,7 +126,7 @@ var Metalpoint = (function () {
         m.points.push(strt);
 
         m.mcurveTo = function (x, y) {
-            var start = start = this.points[this.points.length-1],
+            var start = this.points[this.points.length-1],
                 midpt = {x: (start.x+x)/2, y: (start.y+y)/2};
 
             this.curveTo(midpt.x, midpt.y, midpt.x, midpt.y, x, y);
@@ -163,9 +164,9 @@ var Metalpoint = (function () {
                 this.points[i].translate(dx, dy);
             };
             this.translate(dx, dy);
-        }
+        };
 
-        m.mousedown(function () { mp.setDrag(this); })
+        m.mousedown(function (e) { mp.setDrag(this, e); })
 
         return m;
     };</diff>
      <filename>public/metalpoint.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b5d6ae7e29ce1c953a3118699e27008f0c5fd0e4</id>
    </parent>
  </parents>
  <author>
    <name>Chris Lloyd</name>
    <email>christopher.lloyd@gmail.com</email>
  </author>
  <url>http://github.com/chrislloyd/metalpoint/commit/5512299d711200b29db62dacc56f36f12fedd6da</url>
  <id>5512299d711200b29db62dacc56f36f12fedd6da</id>
  <committed-date>2009-06-08T04:06:36-07:00</committed-date>
  <authored-date>2009-06-08T04:06:36-07:00</authored-date>
  <message>Fix fixes and public demo.</message>
  <tree>f12aeb054980525345cf17ddd090ded45c8d946d</tree>
  <committer>
    <name>Chris Lloyd</name>
    <email>christopher.lloyd@gmail.com</email>
  </committer>
</commit>
