API Docs for:
Show:

operator Class

Module: operator

Provides the operator functions.

Methods

config

(
  • path
)

Configures the groups of the operator panel.

The method can throw an Exception.

Parameters:

  • path String

    The file path of the configuration file. It must use the JSON syntax.

getJSONGroups

() Object

Returns the JSON representation of operator panel groups.

Returns:

Object:

The JSON representation of operator panel groups.

on

(
  • type
  • cb
)
Object

Subscribe a callback function to a custom event fired by this object. It's the same of nodejs events.EventEmitter.on method.

Parameters:

  • type String

    The name of the event

  • cb Function

    The callback to execute in response to the event

Returns:

Object:

A subscription handle capable of detaching that subscription.

reload

() private

Reload the component.

reset

() private

Reload the component.

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object

Properties

CONFIG_FILEPATH

String private

The configuration file path.

emitter

Object private

The event emitter.

EVT_RELOADED

String

The name of the reloaded event.

Default: "reloaded"

groups

Object private

The list of the groups of the operator panel. The keys are the names of the groups and the values are the Group objects.

Default: {}

IDLOG

String private final

The module identifier used by the logger.

Default: [operator]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console

Events

reloaded

Fired when the componente has been reloaded.