Class: LayerDetailView

LayerDetailView()

A LayerDetailView creates a section to be inserted into a LayerDetailsView. It renders a label and a toggle to collapse and expand the section's contents. The contents of the Detail section can be rendered by any other view, but the view should be one that shows details about a MapAsset or allows editing elements of the MapAsset.

Screenshot

Constructor

new LayerDetailView()

Since:
  • 2.18.0
Source:

Extends

  • Backbone.View

Members

className :string

The HTML classes to use for this view's element
Type:
  • string
Source:

classes

CSS classes for HTML elements within this view.
Properties:
Name Type Description
toggle string The element in the template that acts as a toggle to expand or collapse this Layer Detail section.
open string The class to add to the view when the contents are visible (i.e. the section is expanded)
noHeader string The class to add to the view when there is no title/label and the view is not collapsible.
label string The element that holds the view's label text
contentContainer string The container into which the contentView's rendered content will be placed
Source:

contentView :Backbone.View

The sub-view that will show details about, or allow editing of, the given Layer model. The contentView will be passed the Layer model.
Type:
  • Backbone.View
Source:

isOpen :Boolean

Indicates whether this section is collapsed or expanded
Type:
  • Boolean
Source:

label :string

The name to display for the Layer Detail section
Type:
  • string
Source:

model :MapAsset

The model that this view uses
Type:
Source:

template :Underscore.template

The primary HTML template for this view
Type:
  • Underscore.template
Source:

type :string

The type of View this is
Type:
  • string
Source:

Methods

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 LayerDetailView is created
Parameters:
Name Type Attributes Description
options Object <optional>
A literal object with options to pass to the view
Source:

onClose()

Perform clean-up functions when this view is about to be removed from the page or navigated away from.
Source:

render() → {LayerDetailView}

Renders this view
Source:
Returns:
Returns the rendered view element
Type
LayerDetailView

toggle()

Show or hide this section's contents by adding or removing the open class.
Source: