class
SAPO.Component.Gallery
Defined in
Component/Gallery/0.1/lib.js
Constructor Summary
Gallery
(Object
options)
Function Summary
Object
getGallery()
Return the markup created for the programmatic mode
goToNext()
Go to the next image
Go to the previous image
init()
Initialization function. Called by the constructor and
receives the same parameters.
Object
makeThumbList()
Constructor Details
constructor Gallery
Gallery(Object
options)
Parameters:
Element object
options
- options for the new gallery -
[ Object container ]
- container for the gallery and it's controls (simple mode) -
[ Array list ]
- array with objects for gallery generation (programmatic mode). Each object should have href, src, title and caption properties -
[ Boolean hoverControls ]
- activate hover controls -
[ Boolean hoverThumbs ]
- use thumbs instead of prev/next on hover controls -
[ Boolean navLinks ]
- create prev/next links (programatic mode only) -
[ Boolean endsLinks ]
- create first/end links (programatic mode only) -
[ Boolean navThumbs ]
- use thumbs instead of prev/next on nav links (both modes, if true on simple mode, a.innerhtml gets replaced) -
[ Number pageThumbs ]
- define a number of thumbs per page for thumbs pagination. false for no pagination -
[ String prevLabel ]
- label for the previous link/hover control -
[ String nextLabel ]
- label for the next link/hover control -
[ String firstLabel ]
- label for the first link -
[ String lastLabel ]
- label for the last link -
[ String prevPageLabel ]
- label for the prev page link -
[ String nextPageLabel ]
- label for the next page link -
[ Boolean showList ]
- show the list of all image links/thumbs -
[ Boolean showCaption ]
- show the caption -
[ Function onChange ]
- callback executed on every item change -
[ Number width ]
- if passed, image size is changed to maximize width, keeping aspect ratio -
[ Number height ]
- if passed, image size is changed to maximize height, keeping aspect ratio -
[ Number[] maxSize ]
- bounding box for image dimensions (images are scaled down proportionally if bigger than the given dims) -
[ Number fadeInTime ]
- number of milisseconds the fade in animation takes (defaults to 1s) -
[ Number fadeOutTime ]
- number of milisseconds the fade out animation takes (defaults to 1s) -
[ Number startAtIndex ]
- starting image to display on Gallery (starts at 0, unused if SlideBox)
Function Details
function getGallery
Object
getGallery()
Return the markup created for the programmatic mode
function goToNext
goToNext()
Go to the next image
function goToPrevious
goToPrevious()
Go to the previous image
function init
init()
Initialization function. Called by the constructor and
receives the same parameters.
function makeThumbList
Object
makeThumbList()
Returns:
Markup for the thumbnail list