I'm trying to adapt some code from a simple app that uses Raphael to allow users to draw circles and rectangles on a canvas. (original code at https://gist.github.com/673186)
The original code used an older version of jQuery and worked fine. See http://jsfiddle.net/GHZSd/
Using an updated version of jQuery, however, breaks the example. See http://jsfiddle.net/GHZSd/1/
The reason for this is that event.layerX
and event.layerY
are no longer defined in the new version of jQuery. My question is - what code I can use to replace those values? I've tried a couple things just by doing some math (event.originalEvent.layerX/layerX still exist for now so I'm just trying to add/subtract some stuff that will result in those values) but so far what works on one browser doesn't work on all of them.
Sorry if this has been asked before but I wasn't able to find a concrete answer on Stack Overflow or anywhere else.