ol 7.0.0-dev.1659254427776 → 7.0.0-dev.1659255011672

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.
@@ -29,17 +29,12 @@ export type Options = {
29
29
  target?: string | HTMLElement | undefined;
30
30
  /**
31
31
  * Markup to show when the mouse position is not
32
- * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space
33
- * is rendered when the mouse leaves the viewport. To render something else, provide a string
34
- * to be used as the text content (e.g. 'no position' or '' for an empty string). Set the placeholder
35
- * to `false` to retain the last position when the mouse leaves the viewport. In a future release, this
36
- * will be the default behavior.
32
+ * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space is rendered
33
+ * initially and the last position is retained when the mouse leaves the viewport.
34
+ * When a string is provided (e.g. `'no position'` or `''` for an empty string) it is used as a
35
+ * placeholder.
37
36
  */
38
- placeholder?: string | boolean | undefined;
39
- /**
40
- * This option is deprecated. Use the `placeholder` option instead.
41
- */
42
- undefinedHTML?: string | undefined;
37
+ placeholder?: string | undefined;
43
38
  };
44
39
  /***
45
40
  * @template Return
@@ -59,13 +54,11 @@ export type Options = {
59
54
  * callback.
60
55
  * @property {HTMLElement|string} [target] Specify a target if you want the
61
56
  * control to be rendered outside of the map's viewport.
62
- * @property {string|boolean} [placeholder] Markup to show when the mouse position is not
63
- * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space
64
- * is rendered when the mouse leaves the viewport. To render something else, provide a string
65
- * to be used as the text content (e.g. 'no position' or '' for an empty string). Set the placeholder
66
- * to `false` to retain the last position when the mouse leaves the viewport. In a future release, this
67
- * will be the default behavior.
68
- * @property {string} [undefinedHTML=' '] This option is deprecated. Use the `placeholder` option instead.
57
+ * @property {string} [placeholder] Markup to show when the mouse position is not
58
+ * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space is rendered
59
+ * initially and the last position is retained when the mouse leaves the viewport.
60
+ * When a string is provided (e.g. `'no position'` or `''` for an empty string) it is used as a
61
+ * placeholder.
69
62
  */
70
63
  /**
71
64
  * @classdesc
@@ -98,14 +91,14 @@ declare class MousePosition extends Control {
98
91
  un: MousePositionOnSignature<void>;
99
92
  /**
100
93
  * @private
101
- * @type {string}
94
+ * @type {boolean}
102
95
  */
103
- private placeholder_;
96
+ private renderOnMouseOut_;
104
97
  /**
105
98
  * @private
106
- * @type {boolean}
99
+ * @type {string}
107
100
  */
108
- private renderOnMouseOut_;
101
+ private placeholder_;
109
102
  /**
110
103
  * @private
111
104
  * @type {string}
@@ -1 +1 @@
1
- {"version":3,"file":"MousePosition.d.ts","sourceRoot":"","sources":["MousePosition.js"],"names":[],"mappings":";;;;+CA0Ba,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,oBAAoB,EAAE,KAAK,GAC1E,yBAA+B,GAAC,mBAAmB,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GAC7F,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,GAAC,OAAO,oBAAoB,EAAE,KAAK,GACrH,yBAA+B,GAAC,mBAAmB,EAAE,MAAM,CAAC;;;;;;;;;;;;;iBAO/C,OAAO,YAAY,EAAE,cAAc;;;;;;qBAC1B,OAAO,gBAAgB,EAAE,OAAO,KAAE,IAAI;;;;;;;;;;;;;;;;;;;;AAd7D;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;;GAWG;AACH;IACE;;OAEG;IACH,+CA2FC;IA9EC;;OAEG;IACH,IAFU,yBAAyB,OAAO,WAAW,EAAE,SAAS,CAAC,CAE1D;IAEP;;OAEG;IACH,MAFU,yBAAyB,OAAO,WAAW,EAAE,SAAS,CAAC,CAExD;IAET;;OAEG;IACH,IAFU,yBAAyB,IAAI,CAAC,CAEjC;IAoCP;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,+CAkEC;IArDC;;OAEG;IACH,IAFU,yBAAyB,OAAO,WAAW,EAAE,SAAS,CAAC,CAE1D;IAEP;;OAEG;IACH,MAFU,yBAAyB,OAAO,WAAW,EAAE,SAAS,CAAC,CAExD;IAET;;OAEG;IACH,IAFU,yBAAyB,IAAI,CAAC,CAEjC;IAWP;;;OAGG;IACH,0BAA0D;IAE1D;;;OAGG;IACH,qBAA2E;IAE3E;;;OAGG;IACH,sBAAsC;IAEtC;;;OAGG;IACH,uBAA0B;IAE1B;;;OAGG;IACH,mBAAsB;IAGxB;;OAEG;IACH,iCAEC;IAED;;;;;;;OAOG;IACH,uBALY,OAAO,kBAAkB,EAAE,gBAAgB,GAAC,SAAS,CAShE;IAED;;;;;;OAMG;IACH,iBALY,OAAO,uBAAuB,EAAE,OAAO,GAAC,SAAS,CAS5D;IAED;;;OAGG;IACH,iCAHW,UAAU,QAMpB;IAED;;;OAGG;IACH,gCAHW,KAAK,QAKf;IA0BD;;;;;;OAMG;IACH,4BALW,OAAO,kBAAkB,EAAE,gBAAgB,QAOrD;IAED;;;;;;OAMG;IACH,0BALW,OAAO,YAAY,EAAE,cAAc,QAO7C;IAED;;;OAGG;IACH,oBAqCC;CAmBF"}
@@ -41,13 +41,11 @@ const COORDINATE_FORMAT = 'coordinateFormat';
41
41
  * callback.
42
42
  * @property {HTMLElement|string} [target] Specify a target if you want the
43
43
  * control to be rendered outside of the map's viewport.
44
- * @property {string|boolean} [placeholder] Markup to show when the mouse position is not
45
- * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space
46
- * is rendered when the mouse leaves the viewport. To render something else, provide a string
47
- * to be used as the text content (e.g. 'no position' or '' for an empty string). Set the placeholder
48
- * to `false` to retain the last position when the mouse leaves the viewport. In a future release, this
49
- * will be the default behavior.
50
- * @property {string} [undefinedHTML='&#160;'] This option is deprecated. Use the `placeholder` option instead.
44
+ * @property {string} [placeholder] Markup to show when the mouse position is not
45
+ * available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space is rendered
46
+ * initially and the last position is retained when the mouse leaves the viewport.
47
+ * When a string is provided (e.g. `'no position'` or `''` for an empty string) it is used as a
48
+ * placeholder.
51
49
  */
52
50
 
53
51
  /**
@@ -104,41 +102,16 @@ class MousePosition extends Control {
104
102
  }
105
103
 
106
104
  /**
107
- * Change this to `false` when removing the deprecated `undefinedHTML` option.
105
+ * @private
108
106
  * @type {boolean}
109
107
  */
110
- let renderOnMouseOut = true;
111
-
112
- /**
113
- * @type {string}
114
- */
115
- let placeholder = '&#160;';
116
-
117
- if ('undefinedHTML' in options) {
118
- // deprecated behavior
119
- if (options.undefinedHTML !== undefined) {
120
- placeholder = options.undefinedHTML;
121
- }
122
- renderOnMouseOut = !!placeholder;
123
- } else if ('placeholder' in options) {
124
- if (options.placeholder === false) {
125
- renderOnMouseOut = false;
126
- } else {
127
- placeholder = String(options.placeholder);
128
- }
129
- }
108
+ this.renderOnMouseOut_ = options.placeholder !== undefined;
130
109
 
131
110
  /**
132
111
  * @private
133
112
  * @type {string}
134
113
  */
135
- this.placeholder_ = placeholder;
136
-
137
- /**
138
- * @private
139
- * @type {boolean}
140
- */
141
- this.renderOnMouseOut_ = renderOnMouseOut;
114
+ this.placeholder_ = this.renderOnMouseOut_ ? options.placeholder : '&#160;';
142
115
 
143
116
  /**
144
117
  * @private
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "7.0.0-dev.1659254427776",
3
+ "version": "7.0.0-dev.1659255011672",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",