Extends
Methods
afterResultsResize()
#
Respond to window resize and check if the result display should be updated.
Respond to window resize and check if the result display should be updated.
getAvailableRow() → {number}
#
Find an available row at the end. Either we will need to create a new row or use the last available row if it isn't full.
Returns:
Row index
- Type
- number
getQueryValue() → {string}
#
lazyLoadResults()
#
Lazy-load the images that are visible.
onQueryChange(value)
#
onResultsChange(items)
#
Respond to change results event in the results widget. Override the way SelectWidget and GroupElement append the items into the group so we can append them in groups of rows.
Parameters:
Name | Type | Description |
---|---|---|
items |
Array.<mw.widgets.MediaResultWidget> | An array of item elements |
onResultsRemove(items)
#
Respond to removing results event in the results widget. Clear the relevant rows.
Parameters:
Name | Type | Description |
---|---|---|
items |
Array.<OO.ui.OptionWidget> | Removed items |
onResultsScroll(e)
#
processQueueResults(items)
#
Process the media queue giving more items.
Parameters:
queryMediaQueue()
#
Query all sources for media.
resetRows()
#
Reset all the rows; destroy the jQuery elements and reset the rows array.
Reset all the rows; destroy the jQuery elements and reset the rows array.
runLayoutQueue()
#
Run layout methods from the queue only if the element is visible.
setLang(lang)
#
setup()
#
Setup the widget; activate the resize event.
teardown()
#
Teardown the widget; disconnect the window resize event.