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 MOVED
string moved PREV
string prev NEXT
string 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 moveCount
number 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 a1
Array.<number> first array.
a2
Array.<number> second array.
moveCount
number 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 direction
string 'next' or 'prev' movement direction.
moveCount
* cursor move count.
-
next(moveCount)
-
Move cursor to next
Name Type Description moveCount
number | * cursor move count.
-
prev(moveCount)
-
Move cursor to previous
Name Type Description moveCount
number | * cursor move count.
-
setItemPerViewport(itemPerViewport){tart.Carousel}
-
Item per visible viewport
Name Type Description itemPerViewport
number number of visible items.
Returns:
Type Description tart.Carousel itself for chaining.