Class: ImageViewer

hui.ui. ImageViewer


new ImageViewer()

An image slideshow viewer

options: {
 element : «Element | ID»,
 name : «String»,
 perimeter : «Integer»,
 sizeSnap : «Integer»,
 margin : «Integer»,
 ease : «Function»,
 easeEnd : «Function»,
 easeAuto : «Function»,
 easeReturn : «Function»,
 transition : «Integer»,
 transitionEnd : «Integer»,
 transitionReturn : «Integer»,
 images : «Array»,
 listener : «Object»
}
Source:

Methods


<static> create()

Creates a new image viewer

Source:

addImage(img)

Add an image to the stack

Parameters:
Name Type Description
img Object

An image object representing an image

Source:

addImages(images)

Add multiple images to the stack

Parameters:
Name Type Description
images Array

An array of image objects

Source:

clearImages()

Clear all images in the stack

Source:

hide()

Hide the image viewer

Source:

next(user)

Go to the next image

Parameters:
Name Type Description
user Boolean

If it is initiated by the user

Source:

pause()

Pauseslideshow

Source:

play()

Start playing slideshow

Source:

playOrPause()

Start or pause slideshow

Source:

previous(user)

Go to the previous image

Parameters:
Name Type Description
user Boolean

If it is initiated by the user

Source:

show(index?)

Show the image viewer

Parameters:
Name Type Description
index? Integer

Optional index to start from (zero-based)

Source:

showById(id)

Show the image viewer starting at the image with a certain id. Will not show if image is not found

Parameters:
Name Type Description
id Integer

The id if the image to start with

Source: