Class: MapAssetCategoryView

MapAssetCategoryView()

Presents a category header and shows or hides its layers in the editor.

Screenshot

Constructor

new MapAssetCategoryView()

Since:
  • 2.41.0
Source:

Extends

  • Backbone.View

Members

className

Source:

events

Source:

tagName

Source:

Methods

initialize()

Start expanded and subscribe to category label and icon changes
Source:

render() → {MapAssetCategoryView}

Render the header and save container to view to add rows to
Source:
Returns:
This view
Type
MapAssetCategoryView

setExpanded(expanded)

Show or hide this category in the editor without changing AssetCategory.expanded in the saved map config.
Parameters:
Name Type Description
expanded boolean Whether to show the category's layers
Source:

template() → {string}

Create the category disclosure and its content container.
Source:
Returns:
The category HTML
Type
string

toggleCategory()

Show or hide this category's layers in the editor
Source:

updateIcon()

Display the icon sanitized by the category model
Source:

updateLabel()

Update title text without replacing the header button
Source: