Free and Open source Web Builder Framework. Next generation tool for building templates without coding
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1.7 KiB

Selector

Properties

  • name String Selector name, eg. my-class
  • label String Selector label, eg. My Class
  • type Number? Type of the selector. 1 (class) | 2 (id)
  • active Boolean? If not active, it's not selectable by the Style Manager.
  • private Boolean? 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? If true, it can't be removed from the attacched component.

toString

Get selector as a string.

Examples

// Given such selector: { name: 'my-selector', type: 2 }
console.log(selector.toString());
// -> `#my-selector`

Returns String

getLabel

Get selector label.

Examples

// Given such selector: { name: 'my-selector', label: 'My selector' }
console.log(selector.getLabel());
// -> `My selector`

Returns String

setLabel

Update selector label.

Parameters

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

setActive

Update selector active state.

Parameters