Pular para o conteúdo principal

Workspaces

info​

All settings directly regarding workspaces configuration properties (advanced)

img

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);
ParameterTypeRequiredDefaultsDescription
nameStringtrueName to reference the passed value
valueanytrueAny type of value can be passed

Basic Usage​

img

observação

Variable ExecutorName set on workspace A

Get​

1 context.get('name');
ParameterTypeRequiredDefaultsDescription
nameStringtrueName to reference the passed value

Basic Usage​

img

observação

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);
ParameterTypeRequiredDefaultsDescription
nameStringtrueName to reference the passed value
callBackStringtrueA callBack function

Basic Usage​

img

observação

Subscribe to variable previously set on worspace A. Use the new value to make the necessary changes everytime the variable value is updated.