Properties
hasOpenedMetadata :boolean
#
Whether this user has ever opened the metadata panel. Based on a localstorage flag; will be set to true if the client does not support localstorage.
Type:
- boolean
panelWasOpen
#
Properties:
| Name | Type | Description |
|---|---|---|
panelWasOpen |
boolean | state flag which will be used to detect open <-> closed transitions |
Methods
animateMetadataOnce()
#
Animates the metadata area when the viewer is first opened.
freezeHeight()
#
Makes sure the panel does not contract when it is emptied and thus keeps its position as much as possible. This should be called when switching images, before the panel is emptied, and should be undone with unfreezeHeight after the panel has been populated with the new metadata.
getScrollTopWhenOpen() → {number}
#
Returns scroll top position when the panel is fully open. (In other words, the height of the area that is outside the screen, in pixels.)
Returns:
- Type
- number
keydown(e)
#
Handles keydown events for this element.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
jQuery.Event | Key down event |
panelIsOpen() → {boolean}
#
Returns whether the metadata panel is open. (Partially open is considered to be open.)
Returns:
- Type
- boolean
scroll()
#
Receives the window's scroll events and and turns them into business logic events
Fires:
toggle([forceDirection]) → {jQuery.Promise}
#
Toggles the metadata div being totally visible.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
forceDirection |
string |
optional |
'up' or 'down' makes the panel move on that direction (and is a noop if the panel is already at the upmost/bottommost position); without the parameter, the panel position is toggled. (Partially open counts as open.) |
Returns:
A promise which resolves after the animation has finished.
- Type
- jQuery.Promise