From 3a58f9e03313c837ec08cbb53967719f832b1d19 Mon Sep 17 00:00:00 2001 From: Sebastian Holtkamp Date: Thu, 19 Dec 2024 12:53:21 +0100 Subject: [PATCH] Update readmes --- README.md | 2 ++ src/main/js/bundles/dn_intro/README.md | 28 +++++++++++++++++--------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3995719..c8ca781 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ See the `dn_intro` bundle's documentation for more information. ![Tour screenshot](https://github.com/conterra/mapapps-intro/blob/master/img.png) +[dn_intro Documentation](https://github.com/conterra/mapapps-intro/tree/master/src/main/js/bundles/dn_intro) + ## Sample App https://demos.conterra.de/mapapps/resources/apps/downloads_intro_31/index.html?autorefresh=5000&lang=de diff --git a/src/main/js/bundles/dn_intro/README.md b/src/main/js/bundles/dn_intro/README.md index d2c0ee6..840e3f3 100644 --- a/src/main/js/bundles/dn_intro/README.md +++ b/src/main/js/bundles/dn_intro/README.md @@ -9,6 +9,16 @@ An example app with a tour can be found on the con terra demos site: **TODO** Since the `dn_intro` bundle is based on the driver.js library, all the features of driver.js can be used in the `dn_intro` bundle as well. +## Usage +1. First you need to add the bundle dn_intro to your app. +2. Then you can configure it. + +To make the functions of this bundle available to the user, the following tool can be added to a toolset: + +| Tool ID | Component | Description | +|---------------|---------------|--------------------------| +| tourClickTool | TourClickTool | Show or hide the widget. | + ## Configuration Configuration is done on the bundle's `Tour` component. @@ -97,20 +107,20 @@ It must be a `ToolActionConfig` or an `ElementActionConfig` object. `ActionConfig` contains the general properties that are supported by all its subtypes. Both `ToolActionConfig` and `ElementActionConfig` are subtypes of `ActionConfig` and inherit the properties from `ActionConfig`. -| Property name | Mandatory | Type | Description | -|---------------|-----------|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `action` | yes | String | The action to perform. See `ToolActionConfig` or `ElementActionConfig` for details. | -| `delay` | no | Number | The delay in milliseconds before moving to the next step. This is useful when it takes some time until the custom action has an actual effect on the document's element tree. The default value is `100` milliseconds. | +| Property name | Mandatory | Type | Description | +|---------------|-----------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `action` | yes | String | The action to perform. See `ToolActionConfig` or `ElementActionConfig` for details. | +| `delay` | no | Number | The delay in milliseconds before moving to the next step. This is useful when it takes some time until the custom action has an actual effect on the document's element tree. The default value is `100` milliseconds. | #### ToolActionConfig `ToolActionConfig` is used to interact with a concrete map.apps tool. It has all the properties of `ActionConfig` and additionally the following properties: -| Property name | Mandatory | Type | Description | -|---------------|-----------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `action` | yes | String | The action to perform. Must be either `toolActivate` or `toolDeactivate`.
For tools whose `togglable` property is `true`, `toolActivate` activates the tool and `toolDeactivate` deactivates it.
When the tool's `togglable` property is `false`, `toolActivate` calls the tool's `click` method and `toolDeactivate` has no effect. | -| `toolId` | yes | String | The ID of the tool on which to perform an action. The action is specified with `actionName`. | +| Property name | Mandatory | Type | Description | +|---------------|-----------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `action` | yes | String | The action to perform. Must be either `toolActivate` or `toolDeactivate`.
For tools whose `togglable` property is `true`, `toolActivate` activates the tool and `toolDeactivate` deactivates it.
When the tool's `togglable` property is `false`, `toolActivate` calls the tool's `click` method and `toolDeactivate` has no effect. | +| `toolId` | yes | String | The ID of the tool on which to perform an action. The action is specified with `actionName`. | #### ElementActionConfig @@ -120,4 +130,4 @@ You only need to define the `action` property inherited from `ActionConfig`: | Property name | Mandatory | Type | Description | |---------------|-----------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------| -| `action` | yes | String | The action to perform. Must be `elementClick`. A synthetic click event will be triggered on the element selected with the property `DriveStep.element`. | +| `action` | yes | String | The action to perform. Must be `elementClick`. A synthetic click event will be triggered on the element selected with the property `DriveStep.element`. |