ol 9.0.0-dev.1707154322322 → 9.0.0-dev.1707413332477
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/Map.d.ts +5 -10
- package/Map.d.ts.map +1 -1
- package/Map.js +3 -17
- package/VectorRenderTile.d.ts +0 -7
- package/VectorRenderTile.d.ts.map +1 -1
- package/VectorRenderTile.js +0 -6
- package/dist/ol.d.ts +2 -0
- package/dist/ol.d.ts.map +1 -1
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/layer/BaseVector.d.ts +7 -22
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/BaseVector.js +12 -20
- package/layer/Layer.d.ts +12 -0
- package/layer/Layer.d.ts.map +1 -1
- package/layer/Layer.js +23 -0
- package/layer/VectorImage.d.ts +10 -6
- package/layer/VectorImage.d.ts.map +1 -1
- package/layer/VectorImage.js +5 -3
- package/layer/VectorTile.d.ts +22 -30
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/VectorTile.js +10 -14
- package/package.json +1 -1
- package/render/VectorContext.d.ts +22 -11
- package/render/VectorContext.d.ts.map +1 -1
- package/render/VectorContext.js +22 -11
- package/render/canvas/Builder.d.ts +2 -1
- package/render/canvas/Builder.d.ts.map +1 -1
- package/render/canvas/Builder.js +19 -3
- package/render/canvas/Executor.d.ts +18 -7
- package/render/canvas/Executor.d.ts.map +1 -1
- package/render/canvas/Executor.js +101 -57
- package/render/canvas/ExecutorGroup.d.ts +39 -9
- package/render/canvas/ExecutorGroup.d.ts.map +1 -1
- package/render/canvas/ExecutorGroup.js +96 -25
- package/render/canvas/ImageBuilder.d.ts +1 -1
- package/render/canvas/ImageBuilder.d.ts.map +1 -1
- package/render/canvas/ImageBuilder.js +30 -8
- package/render/canvas/Immediate.d.ts +11 -0
- package/render/canvas/Immediate.d.ts.map +1 -1
- package/render/canvas/LineStringBuilder.d.ts.map +1 -1
- package/render/canvas/LineStringBuilder.js +6 -4
- package/render/canvas/PolygonBuilder.d.ts.map +1 -1
- package/render/canvas/PolygonBuilder.js +9 -6
- package/render/canvas/TextBuilder.d.ts +4 -0
- package/render/canvas/TextBuilder.d.ts.map +1 -1
- package/render/canvas/TextBuilder.js +15 -6
- package/render/canvas/ZIndexContext.d.ts +56 -0
- package/render/canvas/ZIndexContext.d.ts.map +1 -0
- package/render/canvas/ZIndexContext.js +112 -0
- package/render/canvas/style.d.ts.map +1 -1
- package/render/canvas/style.js +9 -2
- package/render/canvas.d.ts +2 -2
- package/render/canvas.d.ts.map +1 -1
- package/render/canvas.js +6 -2
- package/renderer/Composite.d.ts +3 -2
- package/renderer/Composite.d.ts.map +1 -1
- package/renderer/Composite.js +26 -19
- package/renderer/Layer.d.ts +4 -0
- package/renderer/Layer.d.ts.map +1 -1
- package/renderer/Layer.js +5 -0
- package/renderer/Map.d.ts +0 -4
- package/renderer/Map.d.ts.map +1 -1
- package/renderer/Map.js +0 -5
- package/renderer/canvas/Layer.d.ts +4 -0
- package/renderer/canvas/Layer.d.ts.map +1 -1
- package/renderer/canvas/Layer.js +32 -0
- package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorImageLayer.js +8 -1
- package/renderer/canvas/VectorLayer.d.ts +6 -5
- package/renderer/canvas/VectorLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorLayer.js +55 -58
- package/renderer/canvas/VectorTileLayer.d.ts +14 -3
- package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorTileLayer.js +129 -60
- package/renderer/vector.d.ts +3 -2
- package/renderer/vector.d.ts.map +1 -1
- package/renderer/vector.js +68 -126
- package/renderer/webgl/PointsLayer.d.ts +1 -0
- package/renderer/webgl/PointsLayer.d.ts.map +1 -1
- package/renderer/webgl/PointsLayer.js +2 -0
- package/source/Raster.js +1 -1
- package/source/WMTS.js +1 -1
- package/style/Circle.d.ts +2 -2
- package/style/Circle.d.ts.map +1 -1
- package/style/Circle.js +1 -1
- package/style/Icon.d.ts +1 -1
- package/style/Icon.d.ts.map +1 -1
- package/style/Icon.js +1 -1
- package/style/Image.d.ts +7 -6
- package/style/Image.d.ts.map +1 -1
- package/style/Image.js +4 -3
- package/style/RegularShape.d.ts +2 -2
- package/style/RegularShape.d.ts.map +1 -1
- package/style/RegularShape.js +1 -1
- package/style/Style.d.ts +17 -0
- package/style/Style.d.ts.map +1 -1
- package/style/Style.js +10 -0
- package/style/Text.d.ts +16 -0
- package/style/Text.d.ts.map +1 -1
- package/style/Text.js +17 -0
- package/style/flat.d.ts +11 -6
- package/style/flat.d.ts.map +1 -1
- package/style/flat.js +4 -3
- package/util.js +1 -1
package/style/RegularShape.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
* @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.
|
|
33
33
|
* @property {number|import("../size.js").Size} [scale=1] Scale. Unless two dimensional scaling is required a better
|
|
34
34
|
* result may be obtained with appropriate settings for `radius` and `radius2`.
|
|
35
|
-
* @property {
|
|
35
|
+
* @property {import('./Style.js').DeclutterMode} [declutterMode] Declutter mode.
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
/**
|
package/style/Style.d.ts
CHANGED
|
@@ -19,6 +19,14 @@ export function createDefaultStyle(feature: import("../Feature.js").FeatureLike,
|
|
|
19
19
|
*/
|
|
20
20
|
export function createEditingStyle(): any;
|
|
21
21
|
export default Style;
|
|
22
|
+
/**
|
|
23
|
+
* Defines how symbols and text are decluttered on layers ith `declutter` set to `true`
|
|
24
|
+
* * **declutter**: Overlapping symbols and text are decluttered.
|
|
25
|
+
* * **obstacle**: Symbols and text are rendered, but serve as obstacle for subsequent attempts
|
|
26
|
+
* to place a symbol or text at the same location.
|
|
27
|
+
* * **none**: No decluttering is done.
|
|
28
|
+
*/
|
|
29
|
+
export type DeclutterMode = "declutter" | "obstacle" | "none";
|
|
22
30
|
/**
|
|
23
31
|
* A function that takes an {@link module :ol/Feature~Feature} and a `{number}`
|
|
24
32
|
* representing the view's resolution. The function should return a
|
|
@@ -80,6 +88,15 @@ export type Options = {
|
|
|
80
88
|
*/
|
|
81
89
|
zIndex?: number | undefined;
|
|
82
90
|
};
|
|
91
|
+
/**
|
|
92
|
+
* Defines how symbols and text are decluttered on layers ith `declutter` set to `true`
|
|
93
|
+
* * **declutter**: Overlapping symbols and text are decluttered.
|
|
94
|
+
* * **obstacle**: Symbols and text are rendered, but serve as obstacle for subsequent attempts
|
|
95
|
+
* to place a symbol or text at the same location.
|
|
96
|
+
* * **none**: No decluttering is done.
|
|
97
|
+
*
|
|
98
|
+
* @typedef {"declutter"|"obstacle"|"none"} DeclutterMode
|
|
99
|
+
*/
|
|
83
100
|
/**
|
|
84
101
|
* A function that takes an {@link module:ol/Feature~Feature} and a `{number}`
|
|
85
102
|
* representing the view's resolution. The function should return a
|
package/style/Style.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Style.d.ts","sourceRoot":"","sources":["Style.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Style.d.ts","sourceRoot":"","sources":["Style.js"],"names":[],"mappings":"AAibA;;;;;;;GAOG;AACH,gCAJW,aAAa,GAAC,MAAM,KAAK,CAAC,GAAC,KAAK,GAE/B,aAAa,CA2BxB;AAOD;;;;GAIG;AACH,4CAJW,OAAO,eAAe,EAAE,WAAW,cACnC,MAAM,GACL,MAAM,KAAK,CAAC,CA6BvB;AAED;;;GAGG;AACH,0CAwDC;;;;;;;;;4BAviBY,WAAW,GAAC,UAAU,GAAC,MAAM;;;;;;;;mCAUpB,OAAO,eAAe,EAAE,WAAW,QAAE,MAAM,KAAE,CAAC,KAAK,GAAC,MAAM,KAAK,CAAC,GAAC,IAAI,CAAC;;;;wBAK/E,KAAK,GAAC,MAAM,KAAK,CAAC,GAAC,aAAa;;;;;sCAOvB,OAAO,eAAe,EAAE,WAAW,KACxD,CAAO,OAAO,qBAAqB,EAAE,OAAO,GAAC,OAAO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ED;;;;;OAKG;IACH,uBAJa,gBAAgB,CAM5B;IAED;;;;OAIG;IACH,WAHY,OAAO,WAAW,EAAE,OAAO,GAAC,IAAI,CAK3C;IAED;;;;OAIG;IACH,cAHW,OAAO,WAAW,EAAE,OAAO,GAAC,IAAI,QAK1C;IAED;;;;OAIG;IACH,YAHY,OAAO,YAAY,EAAE,OAAO,GAAC,IAAI,CAK5C;IAED;;;;OAIG;IACH,gBAHW,OAAO,YAAY,EAAE,OAAO,QAKtC;IAED;;;;OAIG;IACH,aAHY,OAAO,aAAa,EAAE,OAAO,GAAC,IAAI,CAK7C;IAED;;;;OAIG;IACH,kBAHW,OAAO,aAAa,EAAE,OAAO,GAAC,IAAI,QAK5C;IAED;;;;OAIG;IACH,WAHY,OAAO,WAAW,EAAE,OAAO,GAAC,IAAI,CAK3C;IAED;;;;OAIG;IACH,cAHW,OAAO,WAAW,EAAE,OAAO,QAKrC;IAED;;;;OAIG;IACH,aAHY,MAAM,GAAC,SAAS,CAK3B;IAED;;;;;;;OAOG;IACH,sBALW,MAAM,GAAC,OAAO,qBAAqB,EAAE,OAAO,GAAC,gBAAgB,QAsBvE;IAED;;;;;OAKG;IACH,kBAHW,MAAM,GAAC,SAAS,QAK1B;CACF;iBA1agB,WAAW;mBACT,aAAa"}
|
package/style/Style.js
CHANGED
|
@@ -7,6 +7,16 @@ import Fill from './Fill.js';
|
|
|
7
7
|
import Stroke from './Stroke.js';
|
|
8
8
|
import {assert} from '../asserts.js';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Defines how symbols and text are decluttered on layers ith `declutter` set to `true`
|
|
12
|
+
* * **declutter**: Overlapping symbols and text are decluttered.
|
|
13
|
+
* * **obstacle**: Symbols and text are rendered, but serve as obstacle for subsequent attempts
|
|
14
|
+
* to place a symbol or text at the same location.
|
|
15
|
+
* * **none**: No decluttering is done.
|
|
16
|
+
*
|
|
17
|
+
* @typedef {"declutter"|"obstacle"|"none"} DeclutterMode
|
|
18
|
+
*/
|
|
19
|
+
|
|
10
20
|
/**
|
|
11
21
|
* A function that takes an {@link module:ol/Feature~Feature} and a `{number}`
|
|
12
22
|
* representing the view's resolution. The function should return a
|
package/style/Text.d.ts
CHANGED
|
@@ -101,6 +101,10 @@ export type Options = {
|
|
|
101
101
|
* values in the array is `[top, right, bottom, left]`.
|
|
102
102
|
*/
|
|
103
103
|
padding?: number[] | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Declutter mode: `declutter`, `obstacle`, `none`
|
|
106
|
+
*/
|
|
107
|
+
declutterMode?: import("../style/Style.js").DeclutterMode | undefined;
|
|
104
108
|
};
|
|
105
109
|
/**
|
|
106
110
|
* @typedef {Object} Options
|
|
@@ -140,6 +144,7 @@ export type Options = {
|
|
|
140
144
|
* is `'point'`. Default is no stroke.
|
|
141
145
|
* @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of
|
|
142
146
|
* values in the array is `[top, right, bottom, left]`.
|
|
147
|
+
* @property {import('../style/Style.js').DeclutterMode} [declutterMode] Declutter mode: `declutter`, `obstacle`, `none`
|
|
143
148
|
*/
|
|
144
149
|
/**
|
|
145
150
|
* @classdesc
|
|
@@ -251,6 +256,11 @@ declare class Text {
|
|
|
251
256
|
* @type {Array<number>|null}
|
|
252
257
|
*/
|
|
253
258
|
private padding_;
|
|
259
|
+
/**
|
|
260
|
+
* @private
|
|
261
|
+
* @type {import('../style/Style.js').DeclutterMode}
|
|
262
|
+
*/
|
|
263
|
+
private declutterMode_;
|
|
254
264
|
/**
|
|
255
265
|
* Clones the style.
|
|
256
266
|
* @return {Text} The cloned style.
|
|
@@ -376,6 +386,12 @@ declare class Text {
|
|
|
376
386
|
* @api
|
|
377
387
|
*/
|
|
378
388
|
getPadding(): Array<number> | null;
|
|
389
|
+
/**
|
|
390
|
+
* Get the declutter mode of the shape
|
|
391
|
+
* @return {import("./Style.js").DeclutterMode} Shape's declutter mode
|
|
392
|
+
* @api
|
|
393
|
+
*/
|
|
394
|
+
getDeclutterMode(): import("./Style.js").DeclutterMode;
|
|
379
395
|
/**
|
|
380
396
|
* Set the `overflow` property.
|
|
381
397
|
*
|
package/style/Text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["Text.js"],"names":[],"mappings":";;;;;;;4BAOa,OAAO,GAAG,MAAM;0BAQhB,MAAM,GAAG,QAAQ,GAAG,OAAO
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["Text.js"],"names":[],"mappings":";;;;;;;4BAOa,OAAO,GAAG,MAAM;0BAQhB,MAAM,GAAG,QAAQ,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH;;;;GAIG;AACH;IACE;;OAEG;IACH,2CAyIC;IAtIC;;;OAGG;IACH,cAAyB;IAEzB;;;OAGG;IACH,kBAAiC;IAEjC;;;OAGG;IACH,wBAA6C;IAE7C;;;OAGG;IACH,eAA2B;IAE3B;;;OAGG;IACH,oBAA0E;IAE1E;;;OAGG;IACH,cAAyB;IAEzB;;;OAGG;IACH,mBAAmC;IAEnC;;;OAGG;IACH,iBAA+B;IAE/B;;;OAGG;IACH,gBAA6B;IAE7B;;;OAGG;IACH,sBAAyC;IAEzC;;;OAGG;IACH,cAG2C;IAE3C;;;OAGG;IACH,kBACiE;IAEjE;;;OAGG;IACH,mBAC+D;IAE/D;;;OAGG;IACH,kBAAmC;IAEnC;;;OAGG;IACH,gBAAmE;IAEnE;;;OAGG;IACH,iBAAmE;IAEnE;;;OAGG;IACH,iBAAmE;IAEnE;;;OAGG;IACH,wBAEQ;IAER;;;OAGG;IACH,0BAEQ;IAER;;;OAGG;IACH,iBAAsE;IAEtE;;;OAGG;IACH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H,sBAHW,OAAO,QAKjB;IAED;;;;;OAKG;IACH,cAHW,MAAM,GAAC,SAAS,QAK1B;IAED;;;;;OAKG;IACH,sBAHW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,oBAHW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,oBAHW,MAAM,QAKhB;IAED;;;;;OAKG;IACH,wBAHW,aAAa,QAKvB;IAED;;;;OAIG;IACH,mBAHW,MAAM,GAAC,SAAS,QAK1B;IAED;;;;;OAKG;IACH,kCAHW,OAAO,QAKjB;IAED;;;;;OAKG;IACH,cAHW,OAAO,WAAW,EAAE,OAAO,GAAC,IAAI,QAK1C;IAED;;;;;OAKG;IACH,sBAHW,MAAM,GAAC,SAAS,QAK1B;IAED;;;;;OAKG;IACH,gBAHW,MAAM,GAAC,OAAO,YAAY,EAAE,IAAI,GAAC,SAAS,QAMpD;IAED;;;;;OAKG;IACH,kBAHW,OAAO,aAAa,EAAE,OAAO,GAAC,IAAI,QAK5C;IAED;;;;;OAKG;IACH,cAHW,MAAM,GAAC,MAAM,MAAM,CAAC,GAAC,SAAS,QAKxC;IAED;;;;;OAKG;IACH,wBAHW,eAAe,GAAC,SAAS,QAKnC;IAED;;;;;OAKG;IACH,oBAHW,WAAW,GAAC,SAAS,QAK/B;IAED;;;;;OAKG;IACH,8BAHW,kBAAkB,GAAC,SAAS,QAKtC;IAED;;;;;OAKG;IACH,wBAHW,OAAO,WAAW,EAAE,OAAO,GAAC,IAAI,QAK1C;IAED;;;;;OAKG;IACH,4BAHW,OAAO,aAAa,EAAE,OAAO,GAAC,IAAI,QAK5C;IAED;;;;;OAKG;IACH,oBAHW,MAAM,MAAM,CAAC,GAAC,IAAI,QAK5B;CACF;iBAhnBgB,WAAW"}
|
package/style/Text.js
CHANGED
|
@@ -62,6 +62,7 @@ const DEFAULT_FILL_COLOR = '#333';
|
|
|
62
62
|
* is `'point'`. Default is no stroke.
|
|
63
63
|
* @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of
|
|
64
64
|
* values in the array is `[top, right, bottom, left]`.
|
|
65
|
+
* @property {import('../style/Style.js').DeclutterMode} [declutterMode] Declutter mode: `declutter`, `obstacle`, `none`
|
|
65
66
|
*/
|
|
66
67
|
|
|
67
68
|
/**
|
|
@@ -204,6 +205,12 @@ class Text {
|
|
|
204
205
|
* @type {Array<number>|null}
|
|
205
206
|
*/
|
|
206
207
|
this.padding_ = options.padding === undefined ? null : options.padding;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @private
|
|
211
|
+
* @type {import('../style/Style.js').DeclutterMode}
|
|
212
|
+
*/
|
|
213
|
+
this.declutterMode_ = options.declutterMode;
|
|
207
214
|
}
|
|
208
215
|
|
|
209
216
|
/**
|
|
@@ -237,6 +244,7 @@ class Text {
|
|
|
237
244
|
? this.getBackgroundStroke().clone()
|
|
238
245
|
: undefined,
|
|
239
246
|
padding: this.getPadding() || undefined,
|
|
247
|
+
declutterMode: this.getDeclutterMode(),
|
|
240
248
|
});
|
|
241
249
|
}
|
|
242
250
|
|
|
@@ -419,6 +427,15 @@ class Text {
|
|
|
419
427
|
return this.padding_;
|
|
420
428
|
}
|
|
421
429
|
|
|
430
|
+
/**
|
|
431
|
+
* Get the declutter mode of the shape
|
|
432
|
+
* @return {import("./Style.js").DeclutterMode} Shape's declutter mode
|
|
433
|
+
* @api
|
|
434
|
+
*/
|
|
435
|
+
getDeclutterMode() {
|
|
436
|
+
return this.declutterMode_;
|
|
437
|
+
}
|
|
438
|
+
|
|
422
439
|
/**
|
|
423
440
|
* Set the `overflow` property.
|
|
424
441
|
*
|
package/style/flat.d.ts
CHANGED
|
@@ -155,6 +155,7 @@
|
|
|
155
155
|
* @property {NumberExpression} [text-background-stroke-line-dash-offset=0] Line dash offset.
|
|
156
156
|
* @property {NumberExpression} [text-background-stroke-miter-limit=10] Miter limit.
|
|
157
157
|
* @property {NumberExpression} [text-background-stroke-width] Stroke pixel width.
|
|
158
|
+
* @property {import("./Style.js").DeclutterMode} [text-declutter-mode] Declutter mode
|
|
158
159
|
* @property {NumberExpression} [z-index] The zIndex of the style.
|
|
159
160
|
*/
|
|
160
161
|
/**
|
|
@@ -192,7 +193,7 @@
|
|
|
192
193
|
* @property {BooleanExpression} [icon-rotate-with-view=false] Whether to rotate the icon with the view.
|
|
193
194
|
* @property {import("../size.js").Size} [icon-size] Icon size in pixel. Can be used together with `icon-offset` to define the
|
|
194
195
|
* sub-rectangle to use from the origin (sprite) icon image.
|
|
195
|
-
* @property {"
|
|
196
|
+
* @property {import("./Style.js").DeclutterMode} [icon-declutter-mode] Declutter mode
|
|
196
197
|
* @property {NumberExpression} [z-index] The zIndex of the style.
|
|
197
198
|
*/
|
|
198
199
|
/**
|
|
@@ -217,7 +218,7 @@
|
|
|
217
218
|
* @property {BooleanExpression} [shape-rotate-with-view=false] Whether to rotate the shape with the view.
|
|
218
219
|
* @property {SizeExpression} [shape-scale=1] Scale. Unless two dimensional scaling is required a better
|
|
219
220
|
* result may be obtained with appropriate settings for `shape-radius` and `shape-radius2`.
|
|
220
|
-
* @property {"
|
|
221
|
+
* @property {import("./Style.js").DeclutterMode} [shape-declutter-mode] Declutter mode.
|
|
221
222
|
* @property {NumberExpression} [z-index] The zIndex of the style.
|
|
222
223
|
*/
|
|
223
224
|
/**
|
|
@@ -240,7 +241,7 @@
|
|
|
240
241
|
* (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).
|
|
241
242
|
* @property {BooleanExpression} [circle-rotate-with-view=false] Whether to rotate the shape with the view
|
|
242
243
|
* (meaningful only when used in conjunction with a two dimensional scale).
|
|
243
|
-
* @property {"
|
|
244
|
+
* @property {import("./Style.js").DeclutterMode} [circle-declutter-mode] Declutter mode
|
|
244
245
|
* @property {NumberExpression} [z-index] The zIndex of the style.
|
|
245
246
|
*/
|
|
246
247
|
/**
|
|
@@ -492,6 +493,10 @@ export type FlatText = {
|
|
|
492
493
|
* Stroke pixel width.
|
|
493
494
|
*/
|
|
494
495
|
"text-background-stroke-width"?: NumberExpression | undefined;
|
|
496
|
+
/**
|
|
497
|
+
* Declutter mode
|
|
498
|
+
*/
|
|
499
|
+
"text-declutter-mode"?: import("./Style.js").DeclutterMode | undefined;
|
|
495
500
|
/**
|
|
496
501
|
* The zIndex of the style.
|
|
497
502
|
*/
|
|
@@ -586,7 +591,7 @@ export type FlatIcon = {
|
|
|
586
591
|
/**
|
|
587
592
|
* Declutter mode
|
|
588
593
|
*/
|
|
589
|
-
"icon-declutter-mode"?: "
|
|
594
|
+
"icon-declutter-mode"?: import("./Style.js").DeclutterMode | undefined;
|
|
590
595
|
/**
|
|
591
596
|
* The zIndex of the style.
|
|
592
597
|
*/
|
|
@@ -665,7 +670,7 @@ export type FlatShape = {
|
|
|
665
670
|
/**
|
|
666
671
|
* Declutter mode.
|
|
667
672
|
*/
|
|
668
|
-
"shape-declutter-mode"?: "
|
|
673
|
+
"shape-declutter-mode"?: import("./Style.js").DeclutterMode | undefined;
|
|
669
674
|
/**
|
|
670
675
|
* The zIndex of the style.
|
|
671
676
|
*/
|
|
@@ -733,7 +738,7 @@ export type FlatCircle = {
|
|
|
733
738
|
/**
|
|
734
739
|
* Declutter mode
|
|
735
740
|
*/
|
|
736
|
-
"circle-declutter-mode"?: "
|
|
741
|
+
"circle-declutter-mode"?: import("./Style.js").DeclutterMode | undefined;
|
|
737
742
|
/**
|
|
738
743
|
* The zIndex of the style.
|
|
739
744
|
*/
|
package/style/flat.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flat.d.ts","sourceRoot":"","sources":["flat.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;;;;GAMG;AAEH;;;;GAIG;AAEH;;;;;;;;;;GAUG;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA4KrC,MAAM;;;;oBACN,MAAM;;;;oBACN,MAAM;;;;qBACN,MAAM;;;;yBACN,MAAM;;;;2BACN,MAAM;;;;2BACN,MAAM;;;;;;;;;;WAuBN,SAAS,GAAC,MAAM,SAAS,CAAC"}
|
package/style/flat.js
CHANGED
|
@@ -167,6 +167,7 @@
|
|
|
167
167
|
* @property {NumberExpression} [text-background-stroke-line-dash-offset=0] Line dash offset.
|
|
168
168
|
* @property {NumberExpression} [text-background-stroke-miter-limit=10] Miter limit.
|
|
169
169
|
* @property {NumberExpression} [text-background-stroke-width] Stroke pixel width.
|
|
170
|
+
* @property {import("./Style.js").DeclutterMode} [text-declutter-mode] Declutter mode
|
|
170
171
|
* @property {NumberExpression} [z-index] The zIndex of the style.
|
|
171
172
|
*/
|
|
172
173
|
|
|
@@ -205,7 +206,7 @@
|
|
|
205
206
|
* @property {BooleanExpression} [icon-rotate-with-view=false] Whether to rotate the icon with the view.
|
|
206
207
|
* @property {import("../size.js").Size} [icon-size] Icon size in pixel. Can be used together with `icon-offset` to define the
|
|
207
208
|
* sub-rectangle to use from the origin (sprite) icon image.
|
|
208
|
-
* @property {"
|
|
209
|
+
* @property {import("./Style.js").DeclutterMode} [icon-declutter-mode] Declutter mode
|
|
209
210
|
* @property {NumberExpression} [z-index] The zIndex of the style.
|
|
210
211
|
*/
|
|
211
212
|
|
|
@@ -231,7 +232,7 @@
|
|
|
231
232
|
* @property {BooleanExpression} [shape-rotate-with-view=false] Whether to rotate the shape with the view.
|
|
232
233
|
* @property {SizeExpression} [shape-scale=1] Scale. Unless two dimensional scaling is required a better
|
|
233
234
|
* result may be obtained with appropriate settings for `shape-radius` and `shape-radius2`.
|
|
234
|
-
* @property {"
|
|
235
|
+
* @property {import("./Style.js").DeclutterMode} [shape-declutter-mode] Declutter mode.
|
|
235
236
|
* @property {NumberExpression} [z-index] The zIndex of the style.
|
|
236
237
|
*/
|
|
237
238
|
|
|
@@ -255,7 +256,7 @@
|
|
|
255
256
|
* (positive rotation clockwise, meaningful only when used in conjunction with a two dimensional scale).
|
|
256
257
|
* @property {BooleanExpression} [circle-rotate-with-view=false] Whether to rotate the shape with the view
|
|
257
258
|
* (meaningful only when used in conjunction with a two dimensional scale).
|
|
258
|
-
* @property {"
|
|
259
|
+
* @property {import("./Style.js").DeclutterMode} [circle-declutter-mode] Declutter mode
|
|
259
260
|
* @property {NumberExpression} [z-index] The zIndex of the style.
|
|
260
261
|
*/
|
|
261
262
|
|
package/util.js
CHANGED