View Full Version : 'deadTime' event config option in addition to buffer

5 May 2009, 11:03 PM

Events have a 'buffer' config option:

Causes the handler to be scheduled to run in an Ext.util.DelayedTask delayed by the specified number of milliseconds. If the event fires again within that time, the original handler is not invoked, but the new handler is scheduled in its place.

I run into a situation I need something else. I need a 'deadTime' config option. When the event happen it will fire immediately but then have a period in which other similar events will be ignored. This option can be very useful when dealing with mousewheel event for example. You want the user to get fast response but don't want to fire the mouse wheel event multiple times.