ActiveListActivationOptions<T>
TYPE DEFINITION
Represents options for activation / deactivation methods.
Since 1.0.0
Properties
-
cooldown Optional
The cooldown is the number of milliseconds before another activation / deactivation is allowed. For example if the cooldown is 5000 the ActiveList will not allow transitions until after 5 seconds have passed. Any activation / deactivation in that period will simply be ignored.
This can be useful when you have an animation which should be finished before allowing user interaction again.
The benefit of this cooldown over the cooldown in the Config, is that this cooldown can be different for different actions. For example: it allows you to create two buttons each with a different cooldown.
Note that the cooldown options within the ActiveListActivationOptions takes precedence over the cooldown in the Config.
IMPORTANT: cooldown is only ran when isUserInteraction within the ActiveListActivationOptions is true. This means that autoPlay, which is not a user interaction, ignores the cooldown.
Since 1.0.0
-
isUserInteraction Optional
boolean
Whether or not the action was taken by a user / human. This affects the autoPlay when stopsOnUserInteraction is true, the autoPlay stops, when false the autoPlay is debounced.
Also affects the cooldown when isUserInteraction is true, the cooldown is checked, otherwise when false the cooldown is ignored.
Defaults to true.
Since 1.0.0