Extends
Constructor
new mw.widgets.MediaResultWidget([config])
#
Creates an mw.widgets.MediaResultWidget object.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
optional |
Configuration options Properties:
|
Methods
calculateSizing(originalDimensions, [boundingBox])
#
calculateWrapperPadding(thumbDimensions) → {Object}
#
getDimensions() → {Object}
#
getRow() → {number}
#
Get the row this result is in.
Returns:
row Row number
- Type
- number
getRowHeight() → {number}
#
Set the row height for all size calculations.
Returns:
rowHeight Row height
- Type
- number
hasSrc() → {boolean}
#
Check if the image has a src attribute already.
Returns:
Thumbnail has its source attribute set
- Type
- boolean
lazyLoad()
#
Replace the empty .src attribute of the image with the actual src.
Replace the empty .src attribute of the image with the actual src.
resizeThumb(resizeFactor)
#
Resize thumbnail and element according to the resize factor.
Parameters:
| Name | Type | Description |
|---|---|---|
resizeFactor |
number | The resizing factor for the image |
setRow(row)
#
Set the row this result is in.
Parameters:
| Name | Type | Description |
|---|---|---|
row |
number | Row number |
setRowHeight(rowHeight)
#
Set the row height for all size calculations.
Parameters:
| Name | Type | Description |
|---|---|---|
rowHeight |
number | Row height |