Constructor
new LayerDetailsView()
- Since:
- Source:
Extends
Members
className :string
The HTML classes to use for this view's element
Type:
- Source:
classes :object
Classes that are used to identify the HTML elements that comprise this view.
Type:
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. |
- Source:
isOpen :boolean
Whether or not the layer details view is open
Type:
- Source:
The MapAsset model that this view uses
Type:
- Source:
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:
- Source:
template :Underscore.template
The primary HTML template for this view
Type:
- Source:
type :string
The type of View this is
Type:
- Source:
Methods
close()
Hide/collapse the Layer Details panel. Closing the panel also changes the
MapAsset model's 'selected attribute' to false.
- Source:
events() → {object}
Creates an object that gives the events this view will listen to and the
associated function to call. Each entry in the object has the format 'event
selector': 'function'.
- Source:
Returns:
-
Type
-
object
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 |
- Source:
open()
Show/expand the Layer Details panel. Opening the panel also changes the
MapAsset model's 'selected attribute' to true.
- Source:
Renders this view
- Source:
Returns:
Returns the rendered view element
-
Type
-
LayerDetailsView
|
null
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. |
- Source: