# Selector
# Properties
name
String (opens new window) Selector name, eg.my-class
label
String (opens new window) Selector label, eg.My Class
type
Number (opens new window)? Type of the selector. 1 (class) | 2 (id)active
Boolean (opens new window)? If not active, it's not selectable by the Style Manager.private
Boolean (opens new window)? If true, it can't be seen by the Style Manager, but it will be rendered in the canvas and in export code.protected
Boolean (opens new window)? If true, it can't be removed from the attached component.
# toString
Get selector as a string.
# Examples
// Given such selector: { name: 'my-selector', type: 2 }
console.log(selector.toString());
// -> `#my-selector`
Returns String (opens new window)
# getName
Get selector name.
# Examples
// Given such selector: { name: 'my-selector', label: 'My selector' }
console.log(selector.getName());
// -> `my-selector`
Returns String (opens new window)
# getLabel
Get selector label.
# Examples
// Given such selector: { name: 'my-selector', label: 'My selector' }
console.log(selector.getLabel());
// -> `My selector`
Returns String (opens new window)
# setLabel
Update selector label.
# Parameters
label
String (opens new window) New label
# Examples
// Given such selector: { name: 'my-selector', label: 'My selector' }
selector.setLabel('New Label')
console.log(selector.getLabel());
// -> `New Label`
# getActive
Get selector active state.
Returns Boolean (opens new window)
# setActive
Update selector active state.
# Parameters
value
Boolean (opens new window) New active state