Class RXBuild.UI.DelayedRefresh
The RXBuild.UI.DelayedRefresh Holds a triggerable and cancelable delayed event object which adjusts its frequency.
Defined in: ui_delayedRefresh.js.
Constructor Attributes | Constructor Name and Description |
---|---|
RXBuild.UI.DelayedRefresh(defaultDelay, callBack, invalidateCallback, adaptiveSpeed)
Creates a new instance of RXBuild.UI.DelayedRefresh
|
Field Attributes | Field Name and Description |
---|---|
The delay with which to raise the delegate if none is specified
|
Method Attributes | Method Name and Description |
---|---|
reset(timeout)
Restarts the pending event, cancelling any pending events
|
|
stop()
Cancel the pending trigger
|
Class Detail
RXBuild.UI.DelayedRefresh(defaultDelay, callBack, invalidateCallback, adaptiveSpeed)
Creates a new instance of RXBuild.UI.DelayedRefresh
- Parameters:
- {Number} defaultDelay
- The default delay to use when none is specified.
- {Function} callBack
- The main method to call after time has elapsed
- {Function} invalidateCallback
- Optional. A function to call when a refresh is pending.
- {Float} adaptiveSpeed
- A number from 0 to 1.0 that determines the hi-pass threshold for automatically updating the defaultDelay. If set to 0, the defaultDelay never changes, if set to 1.0, it is always the duration of the last execution of the callback, in between, the delay is averaged at each execution. A good value is 0.1.
Field Detail
{Number}
defaultDelay
The delay with which to raise the delegate if none is specified
Method Detail
reset(timeout)
Restarts the pending event, cancelling any pending events
- Parameters:
- {Number} timeout
- The timeout can override the internally maintained timeout
{Boolean}
stop()
Cancel the pending trigger
- Returns:
- {Boolean} True if there was an event pending to cancel