Constructor
new LightboxInterface()
#
- Source:
Properties
downloadDialog
#
fileReuse
#
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:
empty()
#
Empties the interface.
- Source:
enterFullscreen()
#
Enters fullscreen mode.
- Source:
exitFullscreen()
#
Exits fullscreen mode.
- Source:
fullscreenChange()
#
Handle a fullscreen change event.
- Source:
keydown(e)
#
Handles keydown events on the document
Parameters:
| Name | Type | Description |
|---|---|---|
e |
jQuery.Event | The jQuery keypress event object |
- Source:
mousemove(e)
#
Handles mousemove events on the document
Parameters:
| Name | Type | Description |
|---|---|---|
e |
jQuery.Event | The mousemove event object |
- Source:
open()
#
Opens the lightbox.
- Source:
resetInteractionTimer()
#
Interrupt and reset the 3sec delay to hide the controls
- Source:
setFileReuseData(image, caption, alt)
#
Sets up the file reuse data in the DOM
Parameters:
| Name | Type | Description |
|---|---|---|
image |
ImageModel | |
caption |
string | |
alt |
string |
- Source:
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:
setupCanvasButtons()
#
Setup for canvas navigation buttons
- Source:
unattach()
#
Detaches the interface from the DOM.
Fires:
- Source:
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:
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()