ClickRepeater

A helper class, which, when applied to an element means that a mousedown and hold on that element will, after a configured delay, begin autorepeating click events on that element, starting at a rate of startRate clicks per second, and over accelerateDuration milliseconds, accelerate to firing clicks at endRate times per second.

An example of this is used by the NumberField's spinner triggers.

Configs

6
accelerateDuration: Number= 4000

How long in milliseconds to accelerate from the startRate to the startRate.

delay: Number= 500

How long in milliSeconds to pause before starting the click repeats.

delegate: String

A query selector which specifies subtargets of this ClickRepeater's element which act as the click auto repeat event targets.

element: HTMLElement

The element on which to fire autorepeating click events when the mouse is held down.

endRate: Number= 20

Clicks per second to fire at top speed, after accelerating over the accelerateDuration

startRate: Number= 2

Clicks per second to start firing after the initial delay