new tart.Carousel(items)
Pagination class to handle all paging events
| Name | Type | Description |
|---|---|---|
items |
Array.<*> |
optional
array of items. |
Extends
- goog.events.EventTarget
Members
-
statictart.Carousel.EventTypesstring
-
Event types enumaration
Properties:
Name Type Default Description MOVEDstring moved PREVstring prev NEXTstring next -
statictart.Carousel.SpecRunner
-
Run jasmine spec
-
protectedfirstVisible
-
First visible item index in viewport
-
protecteditemCount
-
-
protecteditemPerViewport
-
-
protecteditems
-
-
protectedlastVisible
-
Last visible item index in viewport
Methods
-
getItemPerViewport(){number}
-
Get number of visible items in viewport
Returns:
Type Description number number of visible items. -
getItemsToBeInsertedAndRemoved(moveCount){Object}
-
Find which items to be removed and inserted after move
Name Type Description moveCountnumber item move count.
Returns:
Type Description Object object literal which has itemsToBeInserted and itemsToBeRemoved nodes. -
protectedgetMoveDiff(a1, a2, moveCount){Object}
-
Get difference between visible items, after move and before move
Name Type Description a1Array.<number> first array.
a2Array.<number> second array.
moveCountnumber item move count.
Returns:
Type Description Object generated diff. -
getVisibleItemIndexes(){Object}
-
Get visible items indexes
Returns:
Type Description Object visible items array. -
getVisibleItems(){Array.<*>}
-
Get visible items
Returns:
Type Description Array.<*> visible items array. -
protectedmove(direction, moveCount)
-
Move cursor to next or previous item
Name Type Description directionstring 'next' or 'prev' movement direction.
moveCount* cursor move count.
-
next(moveCount)
-
Move cursor to next
Name Type Description moveCountnumber | * cursor move count.
-
prev(moveCount)
-
Move cursor to previous
Name Type Description moveCountnumber | * cursor move count.
-
setItemPerViewport(itemPerViewport){tart.Carousel}
-
Item per visible viewport
Name Type Description itemPerViewportnumber number of visible items.
Returns:
Type Description tart.Carousel itself for chaining.