From fceba73e4d0669408f2d862c62c67ab26139a321 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Wed, 20 Dec 2023 14:55:17 +0100 Subject: [PATCH] Document startupTask / global mobile/desktop config sections --- src/configuration/ViewerConfiguration.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/configuration/ViewerConfiguration.md b/src/configuration/ViewerConfiguration.md index 2565bfda..fdfe2314 100644 --- a/src/configuration/ViewerConfiguration.md +++ b/src/configuration/ViewerConfiguration.md @@ -45,6 +45,7 @@ All settings are optional, with fallback to the default values as documented. |`storeAllLayersInPermalink` | Whether to store the full layertree in the permalink data, rather than only local (i.e. redlining) layers. If `false`, remote layers are re-queried from the respective services, if `true`, they are statically reloaded (meaning restored layers may be outdated compared to current service capabilities). |`urlRegEx` | A [JSON-escaped](https://www.freeformatter.com/json-escape.html) regular expression used to match URLs in feature attribute values. Default: see `qwc2/utils/MiscUtils.js`. | |`trustWmsCapabilityURLs` | Whether to trust the GetMap etc. URLs reported in WMS service capabilities. If not `true`, the protocol, host and pathname portion of the URLs are inherited from the called capabilities URL. | + ### Global settings, overridable per theme The following options can be specified globally, and also overriden per theme, see [`themesConfig.json`](ThemesConfiguration.md). @@ -68,12 +69,34 @@ All settings are optional, with fallback to the default values as documented. |`globallyDisableDockableDialogs` | Whether to globally disable the dockable feature of popup dialogs. Default value: `false`. | |`globallyDisableMaximizeableDialogs` | Whether to globally disable the maximizeable feature of popup dialogs. Default value: `false`. | |`searchFilterRegions` | List of predefined search filter regions, see [Search filtering](../topics/Search.md#filtering). | +|`startupTask` | Task to automatically start when switching to the theme, in the format `{key: "", "mode": ""}`. Takes precedence over the global `startupTask`. Note that the task whenever switching to the theme, not only on application start. | Note: - The layer tree supports re-ordering layers via drag-and-drop if `allowReorderingLayers = true` *and either* `preventSplittingGroupsWhenReordering = true` *or* `flattenLayerTreeGroups = true`. - If `preserveExtentOnThemeSwitch = true`, the current extent is preserved if it is within the new theme extent and if the current theme map projection is equal to the new theme projection. If `preserveExtentOnThemeSwitch = "force"`, the current extent is preserved regardless of whether it is within the new theme extent, but the current and new theme map projections must still match. +### Separate `mobile` / `desktop` global settings + +You can specify the global settings separately for `mobile` and `desktop` by setting these in a corresponding toplevel section, i.e.: + +```js +{ + "": "", // This property applies for both mobile and desktop + ... + "mobile": { + ": "", // This property applies only for mobile + ... + }, + "desktop": { + ": "", // This property applies only for desktop + ... + } +} +``` + +You can also specify separate `mobile` and `desktop` sections in the `config` block of a theme item. + ### URLs of external services Some plugins require external services (typically part of the `qwc-services` ecosystem). When using the `qwc-docker`, these configuration entries will be automatically injected into the `config.json` for enabled services.