Constructor
new ViewfinderView()
- Since:
- Source:
Extends
Members
className :string
The HTML class to use for this view's outermost element.
Type:
- Source:
templateVars
Values meant to be used by the rendered HTML template.
- Source:
type :string
The type of View this is
Type:
- Source:
Methods
Helper function to focus input on the search query input and ensure
that the cursor is at the end of the text (as opposed to the beginning
which appears to be the default jQuery behavior).
- Since:
- Source:
getSearch() → {JQuery}
Get the SearchView element.
- Source:
Returns:
The SearchView element.
-
Type
-
JQuery
getZoomPresets() → {JQuery}
Get the ZoomPresetsView element.
- Since:
- Source:
Returns:
The ZoomPresetsView element.
-
Type
-
JQuery
getZoomPresetsPanel(category) → {JQuery}
Get the ZoomPresetsView panel for a given category, if it exists.
Parameters:
Name |
Type |
Description |
category |
ZoomPresetCategory
|
The category of zoom presets to
get the panel for. |
- Since:
- Source:
Returns:
The ZoomPresetsView panel element, or an empty jQuery
object if it doesn't exist.
-
Type
-
JQuery
getZoomPresetsPlacement(category) → {string|object}
Determine where to place a ZoomPresetsView for a given category, based
on the order of categories in the collection.
Parameters:
Name |
Type |
Description |
category |
ZoomPresetCategory
|
The category of zoom presets to
determine placement for. |
- Since:
- Source:
Returns:
"prepend" to add to the beginning of the list,
"append" to add to the end of the list, or { after: JQueryElement } to
add after a specific existing element.
-
Type
-
string
|
object
initialize(options)
Initialize the ViewfinderView.
Parameters:
Name |
Type |
Description |
options |
object
|
The options for the view.
Properties
Name |
Type |
Description |
model |
object
|
The map model to use for this view. |
|
- Source:
removeZoomPresetsCategory(category)
Remove the ZoomPresetsView panel for a given category, if it exists.
Parameters:
Name |
Type |
Description |
category |
ZoomPresetCategory
|
The category of zoom presets to
remove the panel for. |
- Since:
- Source:
render()
Render the view by updating the HTML of the element.
The new HTML is computed from an HTML template that
is passed an object with relevant view state.
- Source:
renderSearchView()
Render child SearchView and append to DOM.
- Source:
renderZoomPresetsView(category)
Render child ZoomPresetsView and append to DOM.
Parameters:
- Since:
- Source: