Expand all

LightboxInterface

Represents the main interface of the lightbox

Constructor

new LightboxInterface() #

Properties

downloadDialog #

Properties:

Type Description
DialogProxy | DownloadDialog
Source:

fileReuse #

Properties:

Type Description
DialogProxy | ReuseDialog
Source:

Methods

attach([parentId]) #

Attaches the interface to the DOM.

Parameters:

Name Type Attributes Description
parentId string optional

parent id where we want to attach the UI. Defaults to document element, override is mainly used for testing.

Source:
Attaches the interface to the DOM.

empty() #

Empties the interface.

Source:
Empties the interface.

enterFullscreen() #

Enters fullscreen mode.

Source:
Enters fullscreen mode.

exitFullscreen() #

Exits fullscreen mode.

Source:
Exits fullscreen mode.

fullscreenChange() #

Handle a fullscreen change event.

Source:
Handle a fullscreen change event.

keydown(e) #

Handles keydown events on the document

Parameters:

Name Type Description
e jQuery.Event

The jQuery keypress event object

Source:
Handles keydown events on the document

mousemove(e) #

Handles mousemove events on the document

Parameters:

Name Type Description
e jQuery.Event

The mousemove event object

Source:
Handles mousemove events on the document

open() #

Opens the lightbox.

Source:
Opens the lightbox.

resetInteractionTimer() #

Interrupt and reset the 3sec delay to hide the controls

Source:
Interrupt and reset the 3sec delay to hide the controls

setFileReuseData(image, caption, alt) #

Sets up the file reuse data in the DOM

Parameters:

Name Type Description
image ImageModel
caption string
alt string
Source:
Sets up the file reuse data in the DOM

setThemeColor(color) #

Update the theme-color of the document

Parameters:

Name Type Description
color string | null

to set as theme-color or null to remove the theme-color

Source:
Update the theme-color of the document

setupCanvasButtons() #

Setup for canvas navigation buttons

Source:
Setup for canvas navigation buttons

unattach() #

Detaches the interface from the DOM.

Fires:

Source:
Detaches the interface from the DOM.

updateControls(currentIndex, imageCount) #

Updates the next and prev buttons as well as the current image number indicator

Parameters:

Name Type Description
currentIndex number

Current image index

imageCount number

Image count

Source:
Updates the next and prev buttons as well as the current image number indicator

userActivity() #

In fullscreen, show the mouse cursor and the controls Call this after any interactivity

Source:

In fullscreen, show the mouse cursor and the controls Call this after any interactivity

userInactive() #

In fullscreen, hide the mouse cursor and the controls Called from resetInteractionTimer()

Source:

In fullscreen, hide the mouse cursor and the controls Called from resetInteractionTimer()