new tart.components.Carousel.View()
Extends
Members
-
domElement
-
-
protecteddomCache
-
-
templateClass
-
Methods
-
buildCarouselItems(itemArray)
-
Build carousel items from item array
Name Type Description itemArrayArray.<Object> carousel data array.
-
buildPager(pager)
-
Name Type Description pagertart.base.plugin.Pager to build pager.
-
inherited clearCache()
-
Clears the view's dom cache. This might come in handy where you find yourself with dangling HTMLElement's who are not in DOM anymore but bugs you because they are in cache. This also helps with memory leaks; you should often clear your cache. TODO: Make this default with a deconstructor for view
-
inherited get(key){Object}
-
Get item, which is indicated on domMappings node Cache them to domCache and return item Example of usage with an id as selector: this.get("[id='elementId']") or this.get("[id=elementId]")
Name Type Description keystring Object key from domMappings node.
Returns:
Type Description Object found object after traverse. -
protectedgetAllCarouselItemsDomReference(){Object}
-
get all carousel items' DOM reference
Returns:
Type Description Object DOM refernce. -
inherited getDOM(){Element}
-
get current DOM reference
Returns:
Type Description Element -
handleNavigationButtons(hasNext, hasPrev)
-
Name Type Description hasNextboolean Whether there is a previous page.
hasPrevboolean Whether there is a next page.
-
hidePrev()
-
Method to hide previous button.
-
move(direction, diff, moveCount)
-
Animate carousel with given rule
Name Type Description directionstring 'next' or 'previous' TODO: this should be enumarated.
diffArray.<Object> items to be inserted.
moveCountnumber count of move.
-
noResults()
-
No results handler
-
render(){string}
-
Render method which has to be overriden
Returns:
Type Description string markup. -
inherited setDOM(dom)
-
Sets base DOM tree for component
Name Type Description domElement base DOM reference for component.
-
setPageSelected(pageNum)
-
Name Type Description pageNumnumber number of selected page.