Class: LightboxData

.data.LightboxData(galleryConfigDict)

Class representing lightbox data.

Constructor

new LightboxData(galleryConfigDict)

Create a lightbox data object.
Parameters:
Name Type Description
galleryConfigDict Object Gallery configuration dictionary.
Source:

Methods

getItem(indexC, bufferSize)

Based on a buffer for adjacent items, get an lightbox data item.
Parameters:
Name Type Description
indexC Number Item index. If negative, reverse is activated.
bufferSize Array Adjacent items that should be loaded too.
Source:
Returns:
Promise containing the item and its index.
Get the share link for a specific item based on the index.
Parameters:
Name Type Description
index Number Item index.
Source:
Returns:
URL of the gallery site containing the shared item identifier as query parameter.
Type
String | undefined

getSidebarTemplate()

Get the sidebar template.
Source:
Returns:
Promise containing the sidebar template.

isItemCompletelyLoaded(index, bufferSize)

Based on a buffer for adjacent items, check if an item is completely loaded.
Parameters:
Name Type Description
index Number Item index.
bufferSize Array Number of previous and subsequent items, that should be checked too.
Source:
Returns:
True or false, depending on whether the condition is met.

shownItemPosition(index)

Get the shown position of an item inside the lightbox by index.
Parameters:
Name Type Description
index Number Data index.
Source:
Returns:
Promise containing the gallery index.