From 40f52dc541db0893c073bd5a235dd60605f65d35 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 19 Oct 2021 14:23:31 +0200 Subject: [PATCH] Update docs --- docs/api/style_manager.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/api/style_manager.md b/docs/api/style_manager.md index dd2f2f599..28f5ac25f 100644 --- a/docs/api/style_manager.md +++ b/docs/api/style_manager.md @@ -45,7 +45,7 @@ Returns **[Object][16]** ## addSector 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 @@ -55,13 +55,12 @@ that one will be returned * `sector.name` **[string][17]** Sector's label (optional, default `''`) * `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 `[]`) -* `opts` (optional, default `{}`) * `options` **[Object][16]** Options (optional, default `{}`) ### Examples ```javascript -var sector = styleManager.addSector('mySector',{ +const sector = styleManager.addSector('mySector',{ name: 'My sector', open: true, 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 ``` -Returns **Sector** Added Sector +Returns **[Sector]** Added Sector ## getSector @@ -83,10 +82,10 @@ Get sector by id ### Examples ```javascript -var sector = styleManager.getSector('mySector'); +const sector = styleManager.getSector('mySector'); ``` -Returns **(Sector | null)** +Returns **([Sector] | null)** ## removeSector @@ -102,12 +101,18 @@ Remove a sector by id const removed = styleManager.removeSector('mySector'); ``` -Returns **Sector** Removed sector +Returns **[Sector]** Removed sector ## getSectors Get all sectors +### Examples + +```javascript +const sectors = styleManager.getSectors(); +``` + Returns **[Array][19]<[Sector]>** Collection of sectors ## addProperty