Constructor
new MultimediaViewer()
#
- Source:
Properties
currentIndex :number
#
documentTitle :string
#
viewLogger :ViewLogger
#
Methods
cleanupEventHandlers()
#
Unregisters all event handlers. Currently only used in tests.
- Source:
close()
#
Handles close event coming from the lightbox
- Source:
createDocumentTitle(imageTitle) → {string}
#
Creates a string which can be shown as document title (the text at the top of the browser window).
Parameters:
| Name | Type | Description |
|---|---|---|
imageTitle |
mw.Title
|
null
|
the title object for the image which is displayed; null when the viewer is being closed |
Returns:
- Type
- string
- Source:
displayPlaceholderThumbnail(image, $initialImage, [recursion])
#
Display the thumbnail from the page
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
image |
LightboxImage | |||
$initialImage |
jQuery | The thumbnail from the page |
||
recursion |
boolean |
optional |
false | for internal use, never set this when calling from outside |
- Source:
fetchImageInfo(image) → {jQuery.Promise.<ImageModel>}
#
Loads all the size-independent information needed by the lightbox (image metadata, repo information).
Parameters:
| Name | Type | Description |
|---|---|---|
image |
LightboxImage |
Returns:
- Type
- jQuery.Promise.<ImageModel>
- Source:
Loads all the size-independent information needed by the lightbox (image metadata, repo information).
firstImage()
#
Opens the last image
- Source:
initWithThumbs(thumbs)
#
Initialize the lightbox interface given an array of thumbnail objects.
Parameters:
| Name | Type | Description |
|---|---|---|
thumbs |
Array.<LightboxImage> |
- Source:
Initialize the lightbox interface given an array of thumbnail objects.
lastImage()
#
Opens the last image
- Source:
loadExtensionPlugins(extension) → {jQuery.Promise}
#
Loads the RL module defined for a given file extension, if any
Parameters:
| Name | Type | Description |
|---|---|---|
extension |
string | File extension |
Returns:
- Type
- jQuery.Promise
- Source:
loadImage(image)
#
loadImageByTitle(title, [position])
#
Loads an image by its title
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
title |
mw.Title | ||
position |
number |
optional |
- Source:
loadIndex(index)
#
Loads an image at a specified index in the viewer's thumbnail array.
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number |
- Source:
nextImage()
#
Opens the next image
- Source:
preloadImagesMetadata()
#
Preload metadata for current and next image.
- Source:
prevImage()
#
Opens the previous image
- Source:
resize()
#
Handles resize events in viewer.
- Source:
setTitle()
#
Updates the page title to reflect the current title.
- Source:
setupEventHandlers()
#
Registers all event handlers
- Source:
Events
mmv-close()
#
Fired when the viewer is closed. This is used by the lightbox to notify the main app.
- Source:
mmv-next()
#
Fired when the user requests the next image.
- Source:
mmv-prev()
#
Fired when the user requests the previous image.
- Source:
mmv-resize-end()
#
Fired when the screen size changes. Debounced to avoid continuous triggering while resizing with a mouse.
- Source:
mmv-resize-end()
#
Fired when the screen size changes. Debounced to avoid continuous triggering while resizing with a mouse.
- Source: