Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 1.99 KB

TimerSelectionMixin.md

File metadata and controls

55 lines (39 loc) · 1.99 KB

API Documentation

TimerSelection

Mixin which provides for automatic timed changes in selection.

This mixin is useful for creating slideshow-like elements such as basic-slideshow and basic-slideshow-with-controls.

Typical usage:

class CarouselWithTimer extends TimerSelectionMixin(Carousel) {}
customElements.define('carousel-with-arrows', CarouselWithTimer);

This mixin expects the component to define an items property, as well as selectFirst and selectNext methods. You can implement those yourself, or use ContentItemsMixin and SingleSelectionMixin.

Kind: global class

timerSelection.pause()

Pause automatic progression of the selection.

Kind: instance method of TimerSelection

timerSelection.play()

Begin automatic progression of the selection.

Kind: instance method of TimerSelection

timerSelection.playing : boolean

True if the selection is being automatically advanced.

Kind: instance property of TimerSelection Default: false

timerSelection.selectionTimerDuration : number

The time in milliseconds that will elapse after the selection changes before the selection will be advanced to the next item in the list.

Kind: instance property of TimerSelection Default: 1000 (1 second)