Workspaces
info
All settings directly regarding workspaces configuration properties (advanced)
contextParameter
Description
All the workspaces configuration functions have context as last parameter. Context is of type function and has 3 properties. Set, Get and Subscribe. It allows you set a context variable in workspace and access that variable in another workspace under the same routing scope.
Typical function
1 function onPointClick(e, context){ }
Set
1 context.set('name', value);
Parameter | Type | Required | Defaults | Description |
---|---|---|---|---|
name | String | true | Name to reference the passed value | |
value | any | true | Any type of value can be passed |
Basic Usage
nota
Variable ExecutorName set on workspace A
Get
1 context.get('name');
Parameter | Type | Required | Defaults | Description |
---|---|---|---|---|
name | String | true | Name to reference the passed value |
Basic Usage
nota
Get used on workspace B to access variable ExecutorName previously set on Workspace A
Subscribe
Subscribe context's variable you want to listen
1 context.get('name', callBack function);
Parameter | Type | Required | Defaults | Description |
---|---|---|---|---|
name | String | true | Name to reference the passed value | |
callBack | String | true | A callBack function |
Basic Usage
nota
Subscribe to variable previously set on worspace A. Use the new value to make the necessary changes everytime the variable value is updated.