Class: LayerCategoryItemView

LayerCategoryItemView()

One item in a Category List: shows some basic information about the layer category, including label and icon. Also has a button that expands the nested layers list.

Screenshot

Constructor

new LayerCategoryItemView()

Since:
  • 2.28.0
Source:

Extends

  • Backbone.View

Members

className :string

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

model :AssetCategory

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()

Source:

initialize(options)

Executed when a new LayerCategoryItemView is created
Parameters:
Name Type Description
options Object A literal object with options to pass to the view
Source:

insertIcon()

Inserts the icon before the label.
Source:

render() → {LayerCategoryItemView}

Renders this view
Source:
Returns:
Returns the rendered view element
Type
LayerCategoryItemView
Searches and only displays self if layers match the text.
Parameters:
Name Type Attributes Description
text string <optional>
The search text from user input.
Source:
Returns:
- True if a layer item matches the text
Type
boolean

toggleExpanded()

Sets the model's 'expanded' status attribute to true if it's false, and to false if it's true. Executed when a user clicks on this CategoryItem in a CategoryListView.
Source:

updateLayerList()

Show or hide the layer list based on the category's expand status.
Source: