mobility-toolbox-js 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/controls/Control.js +7 -7
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/ol/controls/RoutingControl.js +41 -13
- package/ol/layers/RoutingLayer.js +43 -39
- package/package.json +1 -1
|
@@ -8,8 +8,7 @@ import BaseObject from 'ol/Object';
|
|
|
8
8
|
*
|
|
9
9
|
* @classproperty {ol/Map~Map|mapboxgl.Map} map - The map which the control refers to.
|
|
10
10
|
* @classproperty {boolean} active - Active the control.
|
|
11
|
-
* @classproperty {
|
|
12
|
-
* @classproperty {HTMLElement} element - The HTML element used to render the control. Read only.
|
|
11
|
+
* @classproperty {HTMLElement} element - The HTML element used to render the control.
|
|
13
12
|
* @classproperty {HTMLElement} target - The HTML element where to render the element property. Default is the map's element. Read only.
|
|
14
13
|
*/
|
|
15
14
|
class Control extends BaseObject {
|
|
@@ -20,7 +19,7 @@ class Control extends BaseObject {
|
|
|
20
19
|
* @param {boolean} [options.active = true] Whether the control is active or not.
|
|
21
20
|
* @param {HTMLElement} [options.element] The HTML element used to render the control.
|
|
22
21
|
* @param {HTMLElement} [options.target] The HTML element where to render the element property. Default is the map's element.
|
|
23
|
-
* @param {
|
|
22
|
+
* @param {function} [options.render] Render function called whenever the control needs to be rerendered.
|
|
24
23
|
*/
|
|
25
24
|
constructor(options = {}) {
|
|
26
25
|
super(options);
|
|
@@ -40,7 +39,7 @@ class Control extends BaseObject {
|
|
|
40
39
|
/**
|
|
41
40
|
* Define control's properties.
|
|
42
41
|
*
|
|
43
|
-
* @
|
|
42
|
+
* @private
|
|
44
43
|
*/
|
|
45
44
|
defineProperties(options) {
|
|
46
45
|
const { target, element, render } = {
|
|
@@ -105,9 +104,7 @@ class Control extends BaseObject {
|
|
|
105
104
|
writable: true,
|
|
106
105
|
},
|
|
107
106
|
render: {
|
|
108
|
-
/**
|
|
109
|
-
* @ignore
|
|
110
|
-
*/
|
|
107
|
+
/** @ignore */
|
|
111
108
|
value: render || this.render,
|
|
112
109
|
writable: true,
|
|
113
110
|
},
|
|
@@ -132,12 +129,15 @@ class Control extends BaseObject {
|
|
|
132
129
|
/**
|
|
133
130
|
* The default render function. It renders content in the HTML element.
|
|
134
131
|
* To be defined in inherited classes.
|
|
132
|
+
*
|
|
133
|
+
* @private
|
|
135
134
|
*/
|
|
136
135
|
render() {}
|
|
137
136
|
|
|
138
137
|
/**
|
|
139
138
|
* The default element to display if this.element is not defined.
|
|
140
139
|
* To be defined in inherited classes.
|
|
140
|
+
*
|
|
141
141
|
* @private
|
|
142
142
|
*/
|
|
143
143
|
// eslint-disable-next-line class-methods-use-this
|