I think I have seen this question before, if I remember correctly it
involved creating a transparent rectangle over the whole paper and
attach the mousemove event to that rectangle, something like:
var paper = Raphael(someDiv, width, height);
var myrectangle = paper.rect(0, 0, yourWidth, yourHeight);
myrectangle.attr({fill: "none", stroke: "none"});
myrectangle.mousemove (function(event){...}
Hth,
Adrian
--
You received this message because you are subscribed to the Google Groups "Raphaël" group.
To post to this group, send an email to raph...@googlegroups.com.
To unsubscribe from this group, send email to raphaeljs+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/raphaeljs?hl=en-GB.
Erhm... I wouldn't know, sorry (only a beginner myself).
Maybe someone else on the list...
Adrian
It's a good idea, if you use jQuery, to also normalise the Raphael
events, by calling "e = jQuery.event.fix(e)" just inside the Raphael
event handler.
Clifford Heath.
Yes, but that is problematic in many surprising cases, and
shouldn't be used unless absolutely necessary. Read the
archives, but the problem is that Raphael reserves the right
to (and sometimes does) recreate the .node, which loses
your handlers.
> Didn't know about jQuery.event.fix(), though, neat trick. Is it
> documented?
I don't know of any documentation for it. I found it while
searching for a solution for my jquery.key module, because
after fix()ing the event, a single-quote and a left-arrow event
look identical in Opera.
Clifford Heath.
Check https://github.com/cjheath/jquery.key for a comprehensive solution
to these problems. You need to use originalEvent to find what existed
before jQuery normalised the event.
jquery.key handles distinguishing all printable and non-printable keys,
including auto-repeat. It's quite hard, it took three days of
exploring quirksmode
to get it right.
Clifford Heath
--
You received this message because you are subscribed to the Google Groups "Raphaël" group.
To post to this group, send an email to raph...@googlegroups.com.
To unsubscribe from this group, send email to raphaeljs+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/raphaeljs?hl=en-GB.