From 8fc70b83d7b4b2104572982a9bea8855a41ee175 Mon Sep 17 00:00:00 2001 From: Konstantin Holm Date: Tue, 3 Sep 2024 15:45:11 +0200 Subject: [PATCH] Update Readmes by sorting parameters by required and alphabet --- packages/core/README.md | 32 ++++++++++++------------ packages/plugins/AddressSearch/README.md | 2 +- packages/plugins/Gfi/README.md | 2 +- packages/plugins/Toast/README.md | 6 ++--- packages/plugins/Zoom/README.md | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/core/README.md b/packages/core/README.md index 20bfe23aa..26028ad14 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -71,16 +71,16 @@ The mapConfiguration allows controlling many client instance details. | fieldName | type | description | | - | - | - | -| layerConf | LayerConf | Layer configuration as required by masterportalAPI. | | language | enum["de", "en"] | Initial language. | +| layerConf | LayerConf | Layer configuration as required by masterportalAPI. | | <...masterportalAPI.fields> | various | The object is also used to initialize the masterportalAPI. Please refer to their documentation for options. | -| | various? | Fields for configuring plugins added with `addPlugins`. Refer to each plugin's documentation for specific fields and options. Global plugin parameters are described [below](#global-plugin-parameters). | -| locales | LanguageOption[]? | All locales in POLAR's plugins can be overridden to fit your needs.| -| vuetify | object? | You may add vuetify configuration here. | +| checkServiceAvailability | boolean? | If set to `true`, all services' availability will be checked with head requests. | | extendedMasterportalapiMarkers | extendedMasterportalapiMarkers? | Optional. If set, all configured visible vector layers' features can be hovered and selected by mouseover and click respectively. They are available as features in the store. Layers with `clusterDistance` will be clustered to a multi-marker that supports the same features. Please mind that this only works properly if you configure nothing but point marker vector layers styled by the masterportalAPI. | -| stylePath | string? | If no link tag with `data-polar="true"` is found in the document, this path will be used to create the link node in the client itself. It defaults to `'./style.css'`. Please mind that `data-polar="true"` is deprecated since it potentially led to flashes of misstyled content. stylePath will replace that solution in the next major release. | +| locales | LanguageOption[]? | All locales in POLAR's plugins can be overridden to fit your needs.| +| | various? | Fields for configuring plugins added with `addPlugins`. Refer to each plugin's documentation for specific fields and options. Global plugin parameters are described [below](#global-plugin-parameters). | | renderFaToLightDom | boolean? | POLAR requires FontAwesome in the Light/Root DOM due to an [unfixed bug in many browsers](https://bugs.chromium.org/p/chromium/issues/detail?id=336876). This value defaults to `true`. POLAR will, by default, just add the required CSS by itself. Should you have a version of Fontawesome already included, you can try to set this to `false` to check whether the versions are interoperable. | -| checkServiceAvailability | boolean? | If set to `true`, all services' availability will be checked with head requests. | +| stylePath | string? | If no link tag with `data-polar="true"` is found in the document, this path will be used to create the link node in the client itself. It defaults to `'./style.css'`. Please mind that `data-polar="true"` is deprecated since it potentially led to flashes of misstyled content. stylePath will replace that solution in the next major release. | +| vuetify | object? | You may add vuetify configuration here. |
Example configuration @@ -166,11 +166,11 @@ To figure out the name of the locales to override, inspect the matching plugin i | fieldName | type |description | | - | - | - | | layers | string[] | List of layer ids. The effect will only be applied to these layers. | +| clusterClickZoom | boolean? | If `true`, clicking a cluster feature will zoom into the clustered features' bounding box (with padding) so that the cluster is "resolved". This happens until the maximum zoom level is reached, at which no further zooming can take place. Defaults to `false`. | | defaultStyle | MarkerStyle? | Used as the default marker style. The default fill color for these markers is `'#005CA9'`. | +| dispatchOnMapSelect | string[]? | If set, the parameters will be spread to dispatchment on map selection. `['target', 'value']` will `dispatch(...['target', 'value'])`. This can be used to open the iconMenu's GFI with `['plugin/iconMenu/openMenuById', 'gfi']`, should the IconMenu exist and the gfi plugin be in it with this id. | | hoverStyle | MarkerStyle? | Used as map marker style for hovered features. The default fill color for these markers is `'#7B1045'`. | | selectionStyle | MarkerStyle? | Used as map marker style for selected features. The default fill color for these markers is `'#679100'`. | -| clusterClickZoom | boolean? | If `true`, clicking a cluster feature will zoom into the clustered features' bounding box (with padding) so that the cluster is "resolved". This happens until the maximum zoom level is reached, at which no further zooming can take place. Defaults to `false`. | -| dispatchOnMapSelect | string[]? | If set, the parameters will be spread to dispatchment on map selection. `['target', 'value']` will `dispatch(...['target', 'value'])`. This can be used to open the iconMenu's GFI with `['plugin/iconMenu/openMenuById', 'gfi']`, should the IconMenu exist and the gfi plugin be in it with this id. | Example configuration: @@ -201,8 +201,8 @@ extendedMasterportalapiMarkers: { | clusterSize | [number, number]? | `width` and `height` of the ``-cluster-marker. | | fill | (string \| masterportalapiPolygonFillHatch)? | Fill color (or hatch pattern) for map marker. | | size | [number, number]? | `width` and `height` of the ``-marker. | -| strokeWidth | (string \| number)? | Width of marker stroke (outer line). Defaults to `'2'`. | | stroke | string? | Color of marker stroke (outer line). Defaults to `'#ffffff'`. | +| strokeWidth | (string \| number)? | Width of marker stroke (outer line). Defaults to `'2'`. | Example configuration: ```js @@ -216,11 +216,11 @@ A full documentation of the masterportalapiPolygonFillHatch is available at the >|Name|Required|Type|Default|Description| >| - | - | - | - | - | ->|pattern|no|enum["diagonal", "diagonal-right", "zig-line", "zig-line-horizontal", "circle", "rectangle", "triangle", "diamond"]/Object|`"diagonal"`|Draw pattern. You may either use a pre-defined pattern from the enum or specify one yourself.| ->|size|no|Number|`30`|Edge length of a singular repeated pattern element.| ->|lineWidth|no|Number|`10`|Line width of drawn pattern. To achieve an even distribution in diagonal and zig-line pattern, choose lineWidth as (1/3 * size). For triangle and diamond, a lineWidth of 1 must be chosen. For rectangle, a lineWidth of at most (1/4 * size) should be chosen. Deviating from these rules is not harmful, but patterns may seem off.| >|backgroundColor|no|Number[]|`[0, 0, 0, 1]`|Background color of polygon.| +>|lineWidth|no|Number|`10`|Line width of drawn pattern. To achieve an even distribution in diagonal and zig-line pattern, choose lineWidth as (1/3 * size). For triangle and diamond, a lineWidth of 1 must be chosen. For rectangle, a lineWidth of at most (1/4 * size) should be chosen. Deviating from these rules is not harmful, but patterns may seem off.| +>|pattern|no|enum["diagonal", "diagonal-right", "zig-line", "zig-line-horizontal", "circle", "rectangle", "triangle", "diamond"]/Object|`"diagonal"`|Draw pattern. You may either use a pre-defined pattern from the enum or specify one yourself.| >|patternColor|no|Number[]|`[255, 255, 255, 1]`|Fill color of pattern drawn on polygon.| +>|size|no|Number|`30`|Edge length of a singular repeated pattern element.| ##### mapConfiguration.LayerConf @@ -267,12 +267,12 @@ The `<...masterportalAPI.fields>` means that any masterportalAPI field may also | fieldName | type | description | | - | - | - | -| startResolution | number | Initial resolution; must be in options. See below. | -| startCenter | number[] | Initial center coordinate. | -| extent | number[] | Map movement will be restricted to this rectangle. | | epsg | string | Leading coordinate system, e.g. `"EPSG:25832"`. | -| options | Array | Defines all available zoomLevels. Entries define `resolution`, `scale`, and `zoomLevel`. See masterportalAPI for details. | +| extent | number[] | Map movement will be restricted to this rectangle. | | namedProjections | Array | Array of usable projections by proj4 string. | +| options | Array | Defines all available zoomLevels. Entries define `resolution`, `scale`, and `zoomLevel`. See masterportalAPI for details. | +| startCenter | number[] | Initial center coordinate. | +| startResolution | number | Initial resolution; must be in options. See below. |
Example configuration diff --git a/packages/plugins/AddressSearch/README.md b/packages/plugins/AddressSearch/README.md index 2fab7e7d6..37a6f881b 100644 --- a/packages/plugins/AddressSearch/README.md +++ b/packages/plugins/AddressSearch/README.md @@ -25,8 +25,8 @@ In `categoryProperties` and `groupProperties`, id strings called `groupId` and ` | fieldName | type | description | | - | - | - | | searchMethods | searchMethodsObject[] | Array of search method descriptions. Only searches configured here can be used. | -| afterResultComponent | VueConstructor? | If given, this component will be rendered in the last line of every single search result. It will be forwarded its search result feature as prop `feature` of type `GeoJSON.Feature`, and the focus state of the result as prop `focus` of type `boolean`. | | addLoading | string? | Optional loading action name to start loading. | +| afterResultComponent | VueConstructor? | If given, this component will be rendered in the last line of every single search result. It will be forwarded its search result feature as prop `feature` of type `GeoJSON.Feature`, and the focus state of the result as prop `focus` of type `boolean`. | | categoryProperties | Record? | An object defining properties for a category. The searchMethod's categoryId is used as identifier. A service without categoryId does not have a fallback category. | | customSearchMethods | Record? | An object with named search functions added to the existing set of configurable search methods. (See `addressSearch.searchMethodsObject.type`) This record's keys are added to that enum. | | customSelectResult | Record? | An object that maps categoryIds to functions. These functions are then called as vuex store actions instead of the `selectResult` default implementation. This allows overriding selection behaviour with full store access. Use `''` as key for categoryless results. | diff --git a/packages/plugins/Gfi/README.md b/packages/plugins/Gfi/README.md index cae7ca6b8..366408cee 100644 --- a/packages/plugins/Gfi/README.md +++ b/packages/plugins/Gfi/README.md @@ -12,9 +12,9 @@ The GFI plugin can be used to fetch and optionally display GFI (GetFeatureInfo) | fieldName | type | description | | - | - | - | +| activeLayerPath | string? | Optional store path to array of active mask layer ids. If used with `LayerChooser`, setting this to `'plugin/layerChooser/activeMaskIds'` will result in an info text in the GFI box, should no layer be active. If used without `LayerChooser`, the active mask layers have to be provided by another plugin or the client. If not set, the GFI plugin may e.g. show an empty list, which may be confusing to some users. | | coordinateSources | string[] | The GFI plugin will react to these coordinate positions in the store. This allows it to react to e.g. the address search of the pins plugin. Please see example configuration for the common use-cases. Please mind that, when referencing another plugin, that plugin must be in `addPlugins` before this one. | | layers | Record | Maps a string (must be a layer ID) to a behaviour configuration for that layer. | -| activeLayerPath | string? | Optional store path to array of active mask layer ids. If used with `LayerChooser`, setting this to `'plugin/layerChooser/activeMaskIds'` will result in an info text in the GFI box, should no layer be active. If used without `LayerChooser`, the active mask layers have to be provided by another plugin or the client. If not set, the GFI plugin may e.g. show an empty list, which may be confusing to some users. | | afterLoadFunction | function (featuresByLayerId: Record): Record? | This method can be used to extend, filter, or otherwise modify a GFI result. | | customHighlightStyle | customHighlighStyle? | If required a user can change the stroke and fill of the highlighted feature. The default style as seen in the example will be used for each part that is not customized. An empty object will return the complete default style while e.g. for an object without a configured fill the default fill will be applied. | | featureList | featureList? | If defined, a list of available vector layer features is visible when no feature is selected. Only usable if `renderType` is set to `iconMenu` and `window` is set to `true` for at least one configured layer. | diff --git a/packages/plugins/Toast/README.md b/packages/plugins/Toast/README.md index 7d63e2332..3452df90f 100644 --- a/packages/plugins/Toast/README.md +++ b/packages/plugins/Toast/README.md @@ -66,11 +66,11 @@ map.$store.dispatch('plugin/toast/addToast', payload) | fieldName | type | description | | - | - | - | -| type | enum['error', 'warning', 'info', 'success'] | Decides the default toast colouring and icon. | | text | string | Textual user information. This may either be a user-readable string or a translation key. | | timeout | number | Any positive non-null number will be used as ms until the toast is closed. 0 means no timeout. | -| color | ?string | See {toast.toastStyle}. Overrides setting for this toast only. | -| icon | ?string | See {toast.toastStyle}. Overrides setting for this toast only. | +| type | enum['error', 'warning', 'info', 'success'] | Decides the default toast colouring and icon. | +| color | string? | See {toast.toastStyle}. Overrides setting for this toast only. | +| icon | string? | See {toast.toastStyle}. Overrides setting for this toast only. | #### Usage example diff --git a/packages/plugins/Zoom/README.md b/packages/plugins/Zoom/README.md index b18f13c5e..3c375fd08 100644 --- a/packages/plugins/Zoom/README.md +++ b/packages/plugins/Zoom/README.md @@ -34,9 +34,9 @@ The map's zoom level can be listened to. | fieldName | type | description | | - | - | - | -| zoomLevel | number | Current OpenLayers zoom level. | | maximumZoomLevel | number | Maximum OpenLayers zoom level. | | minimumZoomLevel | number | Minimum OpenLayers zoom level. | +| zoomLevel | number | Current OpenLayers zoom level. | ```js map.subscribe('plugin/zoom/zoomLevel', (zoomLevel) => {