Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
80 lines (63 loc) · 1.86 KB

File metadata and controls

80 lines (63 loc) · 1.86 KB
Copy raw file
Download raw file
Outline
Edit and raw actions

Configuring plugins

To configure the plugins used by your application, a dedicated section is available in the localConfig.json configuration file:

"plugins": {
  ...
}

Inside the plugins section, several modes can be configured (e.g. desktop or mobile), each one with its own list of plugins:

"plugins": {
  "mobile": [...],
  "desktop": [...]
}

Each plugin can be simply listed (and the default configuration is used):

"plugins": {
  ...
  "desktop": ["Map", "MousePosition", "Toolbar", "TOC"]
}

or fully configured:

"plugins": {
  ...
  "desktop": [{
    "name": "Map",
       ...
    }
  },
  ...
  ]
}

Dynamic configuration

Configuration properties of plugins can use expressions, so that they are dynamically bound to the application state.

An expression is anything between curly brackets ({...}) that is a javascript expression, where the monitored state of the application is available as a set of variables.

To define the monitored state, you have to add a monitorState property in localConfig.json.

{
  ...
  "monitorState": [{"name": "mapType", "path": "mapType.mapType"}]
  ...
}

Where:

  • name is the name of the variable that can be used in expressions
  • path is a javascript object path to the state fragment to be monitored (e.g. map.present.zoom)

When you have a monitored state, you can use it in configuration properties this way: Be sure to write a valid javascript expression.

"cfg": {
  ...
  "myProp": "{state('mapType') === 'openlayers' ? 1 : 2}"
  ...
}

Expressions are supported in cfg properties and in hideFrom and showIn sections.

In addition to monitored state also the page request parameters are available as variables to be used in expressions.

Look at the plugin reference page for a list of available configuration properties.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.