Repeating function helper
Reported by Jake Archibald | July 20th, 2009 @ 08:47 AM | in 2.0
Something to call an action when the mouse button goes down / key is pressed, then repeatedly until the button is lifted. Something like
repeatAction({
repeatDelay: 1,
repeatInterval: 0.5,
onStart: startCallback,
onRepeat: repeatingCallback,
onStop: endCallback
});
Would be nice to have a helper in there to cancel the event when the mouse exits a particular element, although this would apply to mouse repeating more than keyboard events.
Some useful info on keypressing http://unixpapa.com/js/key.html
Comments and changes to this ticket
-
Jake Archibald July 20th, 2009 @ 09:35 AM
Attached clickrepeating class provided by nige.animal@googlemail.com
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A JavaScript Library