# Selector
# Properties
nameString (opens new window) Selector name, eg.my-classlabelString (opens new window) Selector label, eg.My ClasstypeNumber (opens new window)? Type of the selector. 1 (class) | 2 (id)activeBoolean (opens new window)? If not active, it's not selectable by the Style Manager.privateBoolean (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.protectedBoolean (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
labelString (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
valueBoolean (opens new window) New active state