Use clientX and clientY instead of x,y for mouse event test page.
authorGary Kacmarcik <garykac@google.com>
Wed, 23 Oct 2013 13:40:53 -0700
changeset 57 392f6e89d50f
parent 56 a5fb9e3671e2
child 58 e611d19b1659
Use clientX and clientY instead of x,y for mouse event test page.
mouse-event-test.html
--- a/mouse-event-test.html	Tue Oct 22 16:49:23 2013 -0700
+++ b/mouse-event-test.html	Wed Oct 23 13:40:53 2013 -0700
@@ -216,7 +216,7 @@
 		var this_mousemove = e.type + "_" + e.currentTarget.id;
 		if (this_mousemove == last_mousemove) {
 			count_mousemove++;
-			updateCount(calcPosition(e.x, e.y));
+			updateCount(calcPosition(e.clientX, e.clientY));
 			return;
 		}
 		last_mousemove = this_mousemove;
@@ -229,7 +229,7 @@
 	eventinfo["etype"] = e.type;
 	eventinfo["data"] = calcString(e.data);
 	eventinfo["id"] = e.currentTarget.id;
-	eventinfo["xy"] = calcPosition(e.x, e.y);
+	eventinfo["xy"] = calcPosition(e.clientX, e.clientY);
 	addEvent(eventinfo);
 }