Permalink
Browse files

Annotated the event object for Gury mouse listeners to include .canva…

…sX and .canvasY
  • Loading branch information...
1 parent b9996f8 commit c669a57ea1f16c39ccbada89c5a05f2977b06e0d @rsandor committed Oct 18, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 gury.js
View
@@ -831,6 +831,11 @@ window.$g = window.Gury = (function(window, jQuery) {
function triggerObjectAt(gury, e, name, closure) {
if (isDefined(gury._events[name])) {
var pos = getPosition(e.canvas, e);
+
+ // Annotate event object with Gury specific fields
+ e.canvasX = pos.x;
+ e.canvasY = pos.y;
+
var found = false;
var sorted = new Set(true);

0 comments on commit c669a57

Please sign in to comment.