Extends
- Backbone.View
Members
className :string
The HTML classes to use for this view's element
Type:
- string
classes :object
Classes that are used to identify the HTML elements that comprise this view.
Type:
- object
Properties:
Name | Type | Description |
---|---|---|
open |
string | The class to add to the outermost HTML element for this view when the layer details view is open/expanded (not hidden) |
toggle |
string | The element in the template that acts as a toggle to close/hide the details view |
sections |
string | The container for all of the LayerDetailViews. |
label |
string | The label element for the layer that displays a title in the header of the details view |
notification |
string | The element that holds the notification message, if there is one. Inserted before all the details sections. |
badge |
string | The class to add to the badge element that is shown when the layer has a notification message. |
isOpen :boolean
Whether or not the layer details view is open
Type:
- boolean
model :MapAsset
The MapAsset model that this view uses
Type:
sections :Array.<DetailSectionOption>
A list of sections to render within this view that give details about the
MapAsset, or allow editing of the MapAsset appearance. Each section will have a
title and its content will be collapsible.
Type:
- Array.<DetailSectionOption>
template :Underscore.template
The primary HTML template for this view
Type:
- Underscore.template
type :string
The type of View this is
Type:
- string
Methods
close()
Hide/collapse the Layer Details panel. Closing the panel also changes the
MapAsset model's 'selected attribute' to false.
events()
initialize(optionsopt)
Executed when a new LayerDetailsView is created
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
object |
<optional> |
A literal object with options to pass to the view |
open()
Show/expand the Layer Details panel. Opening the panel also changes the
MapAsset model's 'selected attribute' to true.
render() → {LayerDetailsView}
Renders this view
Returns:
Returns the rendered view element
- Type
- LayerDetailsView
updateModel(newModel)
Updates the MapAsset model set on the view then re-renders the view and
displays information about the new model.
Parameters:
Name | Type | Description |
---|---|---|
newModel |
MapAsset | null | the new MapAsset model to use to render the view. If set to null, then the view will be rendered without any layer information. |