imageGallery

(esrith/amos/form/ImageGallery)

ImageGallery is used to display images. Images can also be added and removed as well.

Description
Type Description
descriptionPaneWidth String | Number

Width of description pane.

enableDescriptionPane Boolean

Enable description pane.

enableFullScreen Boolean

Enable full screen mode.

enableThumbnails Boolean

Enable thumbnails pane.

fullScreen Boolean

Specify whether ImageGallery is currently in full screen mode or not (normal mode).

imageList Object[]

Array of JSON image object. JSON image object must have "url" attribute, which point to the image, and primary key attribute, which have unique value.

imagePrimaryKey String

Specify attribute name of JSON image object which acts as a key.

showDescriptionPane Boolean

Show description pane

showThumbnails Boolean

Show thumbnails pane.

thumbnailImageRatio String

Width:height ratio of thumbnail image. String must be in form of "width:height".

thumbnailsHeight String | Number

Height of thumbnails pane.

thumbnailsURLSuffix String

String which will append to the end of each image url to specify corresponding thumbnail image url.

Return type Description
addImage(imgJSON) None

Append new image into the gallery. JSON image object must have "url" attribute, which points to the image, and primary key attribute, which have unique value.

clearAllImages() None

Clear all images in the gallery.

clearDisplayImage() None

Clear currently displayed image from main image pane. This method does not remove image from the gallery.

displayImage(primaryKey) None

Display image in main image pane.

getDisplayImage() Object

Get currently displayed image in the gallery.

removeImage(primaryKey) None

Remove an image from the gallery.

Description
exit-full-screen

Fires when the gallery leaves full screen mode.

full-image-click

Fires when user click on main image pane.

full-screen

Fires when the gallery goes into full screen mode.

image-display

Fires when image is displayed on main image pane.

next-image-button-click

Fires when user click on next image button.

previous-image-button-click

Fires when user click on previous image button.

thumbnail-image-click

Fires when user click on thumbnail image.

Constructors Detail
Properties Detail
<String | Number>
descriptionPaneWidth

Width of description pane.

<Boolean>
enableDescriptionPane

Enable description pane.

<Boolean>
enableFullScreen

Enable full screen mode.

<Boolean>
enableThumbnails

Enable thumbnails pane.

<Boolean>
fullScreen

Specify whether ImageGallery is currently in full screen mode or not (normal mode).

<Object[]>
imageList

Array of JSON image object. JSON image object must have "url" attribute, which point to the image, and primary key attribute, which have unique value.

<String>
imagePrimaryKey

Specify attribute name of JSON image object which acts as a key.

<Boolean>
showDescriptionPane

Show description pane

<Boolean>
showThumbnails

Show thumbnails pane.

<String>
thumbnailImageRatio

Width:height ratio of thumbnail image. String must be in form of "width:height".

<String | Number>
thumbnailsHeight

Height of thumbnails pane.

<String>
thumbnailsURLSuffix

String which will append to the end of each image url to specify corresponding thumbnail image url.

Methods Detail
addImage
(
  • imgJSON
)

Append new image into the gallery. JSON image object must have "url" attribute, which points to the image, and primary key attribute, which have unique value.

Parameters
  • <Object> imgJSON Required

    JSON Image Object.

clearAllImages
()

Clear all images in the gallery.

clearDisplayImage
()

Clear currently displayed image from main image pane. This method does not remove image from the gallery.

displayImage
(
  • primaryKey
)

Display image in main image pane.

Parameters
  • <String> primaryKey Required

    Primary key of image you want to display.

<Object>
getDisplayImage
()

Get currently displayed image in the gallery.

removeImage
(
  • primaryKey
)

Remove an image from the gallery.

Parameters
  • <String> primaryKey Required

    Primary key of image to be deleted.

Events Detail
exit-full-screen

Fires when the gallery leaves full screen mode.

full-image-click

Fires when user click on main image pane.

Event Payload:
  • <Object> image

    Image JSON Object.

full-screen

Fires when the gallery goes into full screen mode.

image-display

Fires when image is displayed on main image pane.

Event Payload:
  • <Object> image

    Image JSON object

next-image-button-click

Fires when user click on next image button.

Event Payload:
  • <Object> before_image

    Image JSON Object before click next image button.

  • <Object> after_image

    Image JSON Object after click next image button.

previous-image-button-click

Fires when user click on previous image button.

Event Payload:
  • <Object> before_image

    Image JSON Object before click previous image button.

  • <Object> after_image

    Image JSON Object after click previous image button.

thumbnail-image-click

Fires when user click on thumbnail image.

Event Payload:
  • <Object> image

    Image JSON object.