Browse Source

Update docs

pull/3901/head
Artur Arseniev 5 years ago
parent
commit
40f52dc541
  1. 19
      docs/api/style_manager.md

19
docs/api/style_manager.md

@ -45,7 +45,7 @@ Returns **[Object][16]**
## addSector ## addSector
Add new sector to the collection. If the sector with the same id already exists, Add new sector to the collection. If the sector with the same id already exists,
that one will be returned that one will be returned.
### Parameters ### Parameters
@ -55,13 +55,12 @@ that one will be returned
* `sector.name` **[string][17]** Sector's label (optional, default `''`) * `sector.name` **[string][17]** Sector's label (optional, default `''`)
* `sector.open` **[Boolean][18]** Indicates if the sector should be opened (optional, default `true`) * `sector.open` **[Boolean][18]** Indicates if the sector should be opened (optional, default `true`)
* `sector.properties` **[Array][19]<[Object][16]>** Array of properties (optional, default `[]`) * `sector.properties` **[Array][19]<[Object][16]>** Array of properties (optional, default `[]`)
* `opts` (optional, default `{}`)
* `options` **[Object][16]** Options (optional, default `{}`) * `options` **[Object][16]** Options (optional, default `{}`)
### Examples ### Examples
```javascript ```javascript
var sector = styleManager.addSector('mySector',{ const sector = styleManager.addSector('mySector',{
name: 'My sector', name: 'My sector',
open: true, open: true,
properties: [{ name: 'My property'}] properties: [{ name: 'My property'}]
@ -69,7 +68,7 @@ var sector = styleManager.addSector('mySector',{
// With `at: 0` we place the new sector at the beginning of the collection // With `at: 0` we place the new sector at the beginning of the collection
``` ```
Returns **Sector** Added Sector Returns **[Sector]** Added Sector
## getSector ## getSector
@ -83,10 +82,10 @@ Get sector by id
### Examples ### Examples
```javascript ```javascript
var sector = styleManager.getSector('mySector'); const sector = styleManager.getSector('mySector');
``` ```
Returns **(Sector | null)** Returns **([Sector] | null)**
## removeSector ## removeSector
@ -102,12 +101,18 @@ Remove a sector by id
const removed = styleManager.removeSector('mySector'); const removed = styleManager.removeSector('mySector');
``` ```
Returns **Sector** Removed sector Returns **[Sector]** Removed sector
## getSectors ## getSectors
Get all sectors Get all sectors
### Examples
```javascript
const sectors = styleManager.getSectors();
```
Returns **[Array][19]<[Sector]>** Collection of sectors Returns **[Array][19]<[Sector]>** Collection of sectors
## addProperty ## addProperty

Loading…
Cancel
Save