Class: AssetColors

AssetColors()

An AssetColors collection represents the colors used to create a color scale for an asset in a map. The last color in the collection is treated as a default.

Constructor

new AssetColors()

Since:
  • 2.18.0
Source:

Extends

  • Backbone.Collection

Members

model :Backbone.Model

The class/model that this collection contains.
Type:
  • Backbone.Model
Source:

Methods

comparator()

Add custom sort functionality such that values are sorted numerically, but keep the special value key words "min" and "max" at the beginning or end of the collection, respectively.
Since:
  • 2.25.0
Source:

getAttr(attr) → {Array}

For any attribute that exists in the models in this collection, return an array of the values for that attribute.
Parameters:
Name Type Description
attr string The attribute to get the values for.
Since:
  • 2.25.0
Source:
Returns:
Type
Array

getDefaultColor() → {AssetColor}

Finds the last color model in the collection. If there are no colors in the collection, returns the default color set in a new Asset Color model.
Source:
Returns:
Type
AssetColor