Properties
MAX_BLOWUP_FACTOR :numberstatic
#
Methods
attach()
#
Registers listeners.
Fires:
- Source:
empty()
#
Clears everything.
- Source:
getCurrentImageWidths() → {ThumbnailWidth}
#
getDimensions() → {Object}
#
Returns width and height of the canvas area (i.e. the space available for the image).
Returns:
Width and height in CSS pixels
- Type
- Object
- Source:
getLightboxImageWidths(image) → {ThumbnailWidth}
#
Gets the widths for a given lightbox image.
Parameters:
| Name | Type | Description |
|---|---|---|
image |
LightboxImage |
Returns:
- Type
- ThumbnailWidth
- Source:
handleDialogEvent(e)
#
Handles a "dialog open/close" event from dialogs on the page.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
jQuery.Event |
- Source:
maybeDisplayPlaceholder(size, $imagePlaceholder)
#
set(imageRawMetadata, $imageElement)
#
Sets image on the canvas; does not resize it to fit. This is used to make the placeholder image available; it will be resized and displayed by #maybeDisplayPlaceholder(). FIXME maybeDisplayPlaceholder() receives the placeholder so it is very unclear why this is necessary at all (apart from setting the LightboxImage, which is used in size calculations).
Parameters:
| Name | Type | Description |
|---|---|---|
imageRawMetadata |
LightboxImage | |
$imageElement |
jQuery |
- Source:
setImageAndMaxDimensions(imageInfo)
#
Resizes image to the given dimensions and displays it on the canvas. This is used to display the actual image; it assumes set function was already called before.
Parameters:
| Name | Type | Description |
|---|---|---|
imageInfo |
ImageModel | thumbnail information |
- Source:
setUpImageClick()
#
Registers click listener on the image.
Fires:
- ReuseDialog#event:mmv-reuse-opened
- ReuseDialog#event:mmv-reuse-closed
- DownloadDialog#event:mmv-download-opened
- DownloadDialog#event:mmv-download-closed
- Source:
unattach()
#
Clears listeners.
- Source: