Really! I honestly didn't know. I just cut'n'pasted the existing
isLeftClick, read about the value of button in my trusty old HTML
Reference Guide and wrote a Object.extend (I've actually added this to
my own prototype-extended.js code).



On 23/04/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
>
> Hey Richard,
>
> Richard Quadling a �crit :
> > Object.extend(Event, {
> >  isRightClick: function(event) {
> >     return (((event.which) && (event.which == 1)) ||
> >             ((event.button) && (event.button == 2)));
> >   },
> >  isMiddleClick: function(event) {
> >     return (((event.which) && (event.which == 1)) ||
> >             ((event.button) && (event.button == 4)));
> >   }
> > });
>
> Hang on, this has been a patch for a long time, and is currently sitting
> in the Events branch.  It will show up in 1.6 :-)
>
> --
> Christophe Porteneuve aka TDD
> [EMAIL PROTECTED]
>
> >
>


-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to