Expand all

LightboxImage

Represents an image on the page.

Constructor

new LightboxImage(fileLink, fileTitle, index, position, thumb, [caption]) #

Parameters:

Name Type Attributes Description
fileLink string

Link to the file - generally a thumb URL

fileTitle mw.Title

Represents the File: page

index number

Which number file this is

position number

The relative position of this image to others with same file

thumb HTMLImageElement

The thumbnail that represents this image on the page

caption string optional

The caption, if any.

Source:

Properties

alt :string #

The alt text of the image

Type:

  • string
Source:
The alt text of the image

caption :string #

The caption of the image, if any

Type:

  • string
Source:
The caption of the image, if any

filePageTitle :mw.Title #

Title of the image's file page

Type:

Source:
Title of the image's file page

index :number #

What number this image is in the array of indexed images

Type:

  • number
Source:
What number this image is in the array of indexed images

originalHeight :number #

Height of the full-sized file (read from HTML data attribute, might be missing)

Type:

  • number
Source:
Height of the full-sized file (read from HTML data attribute, might be missing)

originalWidth :number #

Width of the full-sized file (read from HTML data attribute, might be missing)

Type:

  • number
Source:
Width of the full-sized file (read from HTML data attribute, might be missing)

position :number #

The relative position of this image to others with same file

Type:

  • number
Source:
The relative position of this image to others with same file

src :string #

Link to the file - generally a thumb URL

Type:

  • string
Source:
Link to the file - generally a thumb URL

thumbnail :HTMLImageElement #

The element that holds the already-loaded thumbnail of the image

Type:

Source:
The element that holds the already-loaded thumbnail of the image

Methods

getUrlParam() → {Object|null} #

Parses the handler-specific thumbnail parameter (multilingual SVG lang, PDF page, or paged TIFF lossy-prefixed page) from the sample thumbnail URL, if present.

Returns:

name/value are the handler parameter (e.g. lang/de), urlParam is the width-less iiurlparam string (e.g. langde, or lossy-page1 for paged TIFFs).

Type
Object | null
Source:

Parses the handler-specific thumbnail parameter (multilingual SVG lang, PDF page, or paged TIFF lossy-prefixed page) from the sample thumbnail URL, if present.