new EventStrategy()
Example
var visMon = VisSense(...).monitor({ strategy: new VisSense.VisMon.Strategy.EventStrategy({ throttle: 100 }), update: function() { console.log('updated.'); } }).start();
Extends
Methods
-
init(monitor)
-
The init method is called when a monitor is created and has not started yet.
Parameters:
Name Type Description monitor
VisSense.VisMon - Inherited From:
-
start(monitor)
-
Parameters:
Name Type Description monitor
VisSense.VisMon -
stop(monitor)
-
Parameters:
Name Type Description monitor
VisSense.VisMon
Type Definitions
-
EventStrategyConfig
-
A configuration object to configure a EventStrategy instance.
Type:
- Object
Properties:
Name Type Argument Default Description throttle
number <optional>
50 The time in milliseconds to debounce the state update. Event might fire multiple times in a short period of time. If you want this feature to be disabled set debounce to 0. in milliseconds.