ol 9.2.5-dev.1720379541433 → 9.2.5-dev.1720633366675
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 +1 -1
- package/Map.d.ts.map +1 -1
- package/Map.js +2 -1
- package/dist/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/package.json +1 -1
- package/render/canvas/Executor.d.ts +5 -26
- package/render/canvas/Executor.d.ts.map +1 -1
- package/render/canvas/Executor.js +5 -10
- package/render/canvas/ExecutorGroup.d.ts +2 -2
- package/render/canvas/ExecutorGroup.d.ts.map +1 -1
- package/render/canvas/ExecutorGroup.js +1 -1
- package/structs/RBush.d.ts +10 -32
- package/structs/RBush.d.ts.map +1 -1
- package/structs/RBush.js +9 -12
- package/util.js +1 -1
package/package.json
CHANGED
|
@@ -1,26 +1,5 @@
|
|
|
1
1
|
export default Executor;
|
|
2
|
-
export type
|
|
3
|
-
/**
|
|
4
|
-
* Minimal x.
|
|
5
|
-
*/
|
|
6
|
-
minX: number;
|
|
7
|
-
/**
|
|
8
|
-
* Minimal y.
|
|
9
|
-
*/
|
|
10
|
-
minY: number;
|
|
11
|
-
/**
|
|
12
|
-
* Maximal x.
|
|
13
|
-
*/
|
|
14
|
-
maxX: number;
|
|
15
|
-
/**
|
|
16
|
-
* Maximal y
|
|
17
|
-
*/
|
|
18
|
-
maxY: number;
|
|
19
|
-
/**
|
|
20
|
-
* Value.
|
|
21
|
-
*/
|
|
22
|
-
value: any;
|
|
23
|
-
};
|
|
2
|
+
export type DeclutterEntry = import("../../structs/RBush.js").Entry<import("../../Feature.js").FeatureLike>;
|
|
24
3
|
export type ImageOrLabelDimensions = {
|
|
25
4
|
/**
|
|
26
5
|
* DrawImageX.
|
|
@@ -53,7 +32,7 @@ export type ImageOrLabelDimensions = {
|
|
|
53
32
|
/**
|
|
54
33
|
* DeclutterBox.
|
|
55
34
|
*/
|
|
56
|
-
declutterBox:
|
|
35
|
+
declutterBox: DeclutterEntry;
|
|
57
36
|
/**
|
|
58
37
|
* CanvasTransform.
|
|
59
38
|
*/
|
|
@@ -252,7 +231,7 @@ declare class Executor {
|
|
|
252
231
|
* @param {FeatureCallback<T>} [featureCallback] Feature callback.
|
|
253
232
|
* @param {import("../../extent.js").Extent} [hitExtent] Only check
|
|
254
233
|
* features that intersect this extent.
|
|
255
|
-
* @param {import("rbush").default} [declutterTree] Declutter tree.
|
|
234
|
+
* @param {import("rbush").default<DeclutterEntry>} [declutterTree] Declutter tree.
|
|
256
235
|
* @return {T|undefined} Callback result.
|
|
257
236
|
* @template T
|
|
258
237
|
*/
|
|
@@ -263,9 +242,9 @@ declare class Executor {
|
|
|
263
242
|
* @param {import("../../transform.js").Transform} transform Transform.
|
|
264
243
|
* @param {number} viewRotation View rotation.
|
|
265
244
|
* @param {boolean} snapToPixel Snap point symbols and text to integer pixels.
|
|
266
|
-
* @param {import("rbush").default} [declutterTree] Declutter tree.
|
|
245
|
+
* @param {import("rbush").default<DeclutterEntry>} [declutterTree] Declutter tree.
|
|
267
246
|
*/
|
|
268
|
-
execute(context: CanvasRenderingContext2D, scaledCanvasSize: import("../../size.js").Size, transform: import("../../transform.js").Transform, viewRotation: number, snapToPixel: boolean, declutterTree?:
|
|
247
|
+
execute(context: CanvasRenderingContext2D, scaledCanvasSize: import("../../size.js").Size, transform: import("../../transform.js").Transform, viewRotation: number, snapToPixel: boolean, declutterTree?: import("rbush").default<DeclutterEntry> | undefined): void;
|
|
269
248
|
/**
|
|
270
249
|
* @param {CanvasRenderingContext2D} context Context.
|
|
271
250
|
* @param {import("../../transform.js").Transform} transform Transform.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Executor.d.ts","sourceRoot":"","sources":["Executor.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Executor.d.ts","sourceRoot":"","sources":["Executor.js"],"names":[],"mappings":";6BA2Ba,OAAO,wBAAwB,EAAE,KAAK,CAAC,OAAO,kBAAkB,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,CAoBtB;CACF;0BA5wCyB,4BAA4B"}
|
|
@@ -25,12 +25,7 @@ import {lineStringLength} from '../../geom/flat/length.js';
|
|
|
25
25
|
import {transform2D} from '../../geom/flat/transform.js';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* @typedef {
|
|
29
|
-
* @property {number} minX Minimal x.
|
|
30
|
-
* @property {number} minY Minimal y.
|
|
31
|
-
* @property {number} maxX Maximal x.
|
|
32
|
-
* @property {number} maxY Maximal y
|
|
33
|
-
* @property {*} value Value.
|
|
28
|
+
* @typedef {import('../../structs/RBush.js').Entry<import('../../Feature.js').FeatureLike>} DeclutterEntry
|
|
34
29
|
*/
|
|
35
30
|
|
|
36
31
|
/**
|
|
@@ -42,7 +37,7 @@ import {transform2D} from '../../geom/flat/transform.js';
|
|
|
42
37
|
* @property {number} originX OriginX.
|
|
43
38
|
* @property {number} originY OriginY.
|
|
44
39
|
* @property {Array<number>} scale Scale.
|
|
45
|
-
* @property {
|
|
40
|
+
* @property {DeclutterEntry} declutterBox DeclutterBox.
|
|
46
41
|
* @property {import("../../transform.js").Transform} canvasTransform CanvasTransform.
|
|
47
42
|
*/
|
|
48
43
|
|
|
@@ -71,7 +66,7 @@ const p4 = [];
|
|
|
71
66
|
|
|
72
67
|
/**
|
|
73
68
|
* @param {ReplayImageOrLabelArgs} replayImageOrLabelArgs Arguments to replayImageOrLabel
|
|
74
|
-
* @return {
|
|
69
|
+
* @return {DeclutterEntry} Declutter rbush entry.
|
|
75
70
|
*/
|
|
76
71
|
function getDeclutterBox(replayImageOrLabelArgs) {
|
|
77
72
|
return replayImageOrLabelArgs[3].declutterBox;
|
|
@@ -656,7 +651,7 @@ class Executor {
|
|
|
656
651
|
* @param {FeatureCallback<T>} [featureCallback] Feature callback.
|
|
657
652
|
* @param {import("../../extent.js").Extent} [hitExtent] Only check
|
|
658
653
|
* features that intersect this extent.
|
|
659
|
-
* @param {import("rbush").default} [declutterTree] Declutter tree.
|
|
654
|
+
* @param {import("rbush").default<DeclutterEntry>} [declutterTree] Declutter tree.
|
|
660
655
|
* @return {T|undefined} Callback result.
|
|
661
656
|
* @template T
|
|
662
657
|
*/
|
|
@@ -1248,7 +1243,7 @@ class Executor {
|
|
|
1248
1243
|
* @param {import("../../transform.js").Transform} transform Transform.
|
|
1249
1244
|
* @param {number} viewRotation View rotation.
|
|
1250
1245
|
* @param {boolean} snapToPixel Snap point symbols and text to integer pixels.
|
|
1251
|
-
* @param {import("rbush").default} [declutterTree] Declutter tree.
|
|
1246
|
+
* @param {import("rbush").default<DeclutterEntry>} [declutterTree] Declutter tree.
|
|
1252
1247
|
*/
|
|
1253
1248
|
execute(
|
|
1254
1249
|
context,
|
|
@@ -134,10 +134,10 @@ declare class ExecutorGroup {
|
|
|
134
134
|
* @param {boolean} snapToPixel Snap point symbols and test to integer pixel.
|
|
135
135
|
* @param {Array<import("../canvas.js").BuilderType>} [builderTypes] Ordered replay types to replay.
|
|
136
136
|
* Default is {@link module:ol/render/replay~ALL}
|
|
137
|
-
* @param {import("rbush").default
|
|
137
|
+
* @param {import("rbush").default<import('./Executor.js').DeclutterEntry>|null} [declutterTree] Declutter tree.
|
|
138
138
|
* When set to null, no decluttering is done, even when the executor group has a `ZIndexContext`.
|
|
139
139
|
*/
|
|
140
|
-
execute(targetContext: CanvasRenderingContext2D, scaledCanvasSize: import("../../size.js").Size, transform: import("../../transform.js").Transform, viewRotation: number, snapToPixel: boolean, builderTypes?: import("../canvas.js").BuilderType[] | undefined, declutterTree?:
|
|
140
|
+
execute(targetContext: CanvasRenderingContext2D, scaledCanvasSize: import("../../size.js").Size, transform: import("../../transform.js").Transform, viewRotation: number, snapToPixel: boolean, builderTypes?: import("../canvas.js").BuilderType[] | undefined, declutterTree?: import("rbush").default<import("./Executor.js").DeclutterEntry> | null | undefined): void;
|
|
141
141
|
getDeferredZIndexContexts(): {
|
|
142
142
|
[x: number]: import("./ZIndexContext.js").default[];
|
|
143
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1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ACxB,OAAO,oBAAoB,EAAE,SAAS,QAUhD;IAED;;;;;OAKG;IACH,yBAmBC;IAED;;;OAGG;IACH,wBAHW,KAAK,CAAC,OAAO,cAAc,EAAE,WAAW,CAAC,GACxC,OAAO,CAYlB;IAED;;;;;;;;;OASG;IACH,2BAFa,CAAC,cAPH,OAAO,qBAAqB,EAAE,UAAU,cACxC,MAAM,YACN,MAAM,gBACN,MAAM,YACN,CAAS,IAAsC,EAAtC,OAAO,kBAAkB,EAAE,WAAW,EAAE,IAA8C,EAA9C,OAAO,8BAA8B,EAAE,OAAO,EAAE,IAAM,EAAN,MAAM,KAAG,CAAC,uBAC3G,KAAK,CAAC,OAAO,kBAAkB,EAAE,WAAW,CAAC,GAC5C,CAAC,GAAC,SAAS,CA6HtB;IAED;;;OAGG;IACH,yBAHW,OAAO,oBAAoB,EAAE,SAAS,GACrC,KAAK,CAAC,MAAM,CAAC,GAAC,IAAI,CAc7B;IAED;;OAEG;IACH,WAFY,OAAO,CAIlB;IAED;;;;;;;;;;OAUG;IACH,uBAVW,wBAAwB,oBACxB,OAAO,eAAe,EAAE,IAAI,aAC5B,OAAO,oBAAoB,EAAE,SAAS,gBACtC,MAAM,eACN,OAAO,6KAwFjB;IAED;;MAEC;IAED,+CAEC;IAED,uBAUC;CACF"}
|
|
@@ -350,7 +350,7 @@ class ExecutorGroup {
|
|
|
350
350
|
* @param {boolean} snapToPixel Snap point symbols and test to integer pixel.
|
|
351
351
|
* @param {Array<import("../canvas.js").BuilderType>} [builderTypes] Ordered replay types to replay.
|
|
352
352
|
* Default is {@link module:ol/render/replay~ALL}
|
|
353
|
-
* @param {import("rbush").default
|
|
353
|
+
* @param {import("rbush").default<import('./Executor.js').DeclutterEntry>|null} [declutterTree] Declutter tree.
|
|
354
354
|
* When set to null, no decluttering is done, even when the executor group has a `ZIndexContext`.
|
|
355
355
|
*/
|
|
356
356
|
execute(
|
package/structs/RBush.d.ts
CHANGED
|
@@ -1,55 +1,33 @@
|
|
|
1
1
|
export default RBush;
|
|
2
|
-
export type Entry = {
|
|
3
|
-
|
|
4
|
-
* MinX.
|
|
5
|
-
*/
|
|
6
|
-
minX: number;
|
|
7
|
-
/**
|
|
8
|
-
* MinY.
|
|
9
|
-
*/
|
|
10
|
-
minY: number;
|
|
11
|
-
/**
|
|
12
|
-
* MaxX.
|
|
13
|
-
*/
|
|
14
|
-
maxX: number;
|
|
15
|
-
/**
|
|
16
|
-
* MaxY.
|
|
17
|
-
*/
|
|
18
|
-
maxY: number;
|
|
19
|
-
/**
|
|
20
|
-
* Value.
|
|
21
|
-
*/
|
|
22
|
-
value?: any;
|
|
2
|
+
export type Entry<T> = import("rbush").BBox & {
|
|
3
|
+
value: T;
|
|
23
4
|
};
|
|
24
5
|
/**
|
|
25
|
-
* @typedef {
|
|
26
|
-
* @
|
|
27
|
-
* @property {number} minY MinY.
|
|
28
|
-
* @property {number} maxX MaxX.
|
|
29
|
-
* @property {number} maxY MaxY.
|
|
30
|
-
* @property {Object} [value] Value.
|
|
6
|
+
* @typedef {import("rbush").BBox & {value: T}} Entry
|
|
7
|
+
* @template T
|
|
31
8
|
*/
|
|
32
9
|
/**
|
|
33
10
|
* @classdesc
|
|
34
11
|
* Wrapper around the RBush by Vladimir Agafonkin.
|
|
35
12
|
* See https://github.com/mourner/rbush.
|
|
36
13
|
*
|
|
37
|
-
* @template T
|
|
14
|
+
* @template {Object} T
|
|
38
15
|
*/
|
|
39
|
-
declare class RBush<T> {
|
|
16
|
+
declare class RBush<T extends unknown> {
|
|
40
17
|
/**
|
|
41
18
|
* @param {number} [maxEntries] Max entries.
|
|
42
19
|
*/
|
|
43
20
|
constructor(maxEntries?: number | undefined);
|
|
44
21
|
/**
|
|
45
22
|
* @private
|
|
23
|
+
* @type {RBush_<Entry<T>>}
|
|
46
24
|
*/
|
|
47
25
|
private rbush_;
|
|
48
26
|
/**
|
|
49
27
|
* A mapping between the objects added to this rbush wrapper
|
|
50
28
|
* and the objects that are actually added to the internal rbush.
|
|
51
29
|
* @private
|
|
52
|
-
* @type {Object<string, Entry
|
|
30
|
+
* @type {Object<string, Entry<T>>}
|
|
53
31
|
*/
|
|
54
32
|
private items_;
|
|
55
33
|
/**
|
|
@@ -123,8 +101,8 @@ declare class RBush<T> {
|
|
|
123
101
|
*/
|
|
124
102
|
getExtent(extent?: import("../extent.js").Extent | undefined): import("../extent.js").Extent;
|
|
125
103
|
/**
|
|
126
|
-
* @param {RBush} rbush R-Tree.
|
|
104
|
+
* @param {RBush<T>} rbush R-Tree.
|
|
127
105
|
*/
|
|
128
|
-
concat(rbush: RBush<
|
|
106
|
+
concat(rbush: RBush<T>): void;
|
|
129
107
|
}
|
|
130
108
|
//# sourceMappingURL=RBush.d.ts.map
|
package/structs/RBush.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RBush.d.ts","sourceRoot":"","sources":["RBush.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RBush.d.ts","sourceRoot":"","sources":["RBush.js"],"names":[],"mappings":";kBAUa,CAAC,IADD,OAAO,OAAO,EAAE,IAAI,GAAG;IAAC,KAAK,EAAE,CAAC,CAAA;CAAC;AAD9C;;;GAGG;AAEH;;;;;;GAMG;AACH,oBAFsB,CAAC;IAGrB;;OAEG;IACH,6CAcC;IAbC;;;OAGG;IACH,eAAoC;IAEpC;;;;;OAKG;IACH,eAAgB;IAGlB;;;;OAIG;IACH,eAHW,OAAO,cAAc,EAAE,MAAM,SAC7B,CAAC,QAcX;IAED;;;;OAIG;IACH,cAHW,KAAK,CAAC,OAAO,cAAc,EAAE,MAAM,CAAC,UACpC,KAAK,CAAC,CAAC,CAAC,QAoBlB;IAED;;;;OAIG;IACH,cAHW,CAAC,GACA,OAAO,CAUlB;IAED;;;;OAIG;IACH,eAHW,OAAO,cAAc,EAAE,MAAM,SAC7B,CAAC,QASX;IAED;;;OAGG;IACH,UAFY,KAAK,CAAC,CAAC,CAAC,CAOnB;IAED;;;;OAIG;IACH,oBAHW,OAAO,cAAc,EAAE,MAAM,GAC5B,KAAK,CAAC,CAAC,CAAC,CAcnB;IAED;;;;;;OAMG;IACH,kBAHW,CAAS,IAAC,EAAD,CAAC,KAAG,GAAC,GACb,GAAC,CAIZ;IAED;;;;;OAKG;IACH,wBAJW,OAAO,cAAc,EAAE,MAAM,YAC7B,CAAS,IAAC,EAAD,CAAC,KAAG,GAAC,GACb,GAAC,CAIZ;IAED;;;;;OAKG;IACH,iBASC;IAED;;OAEG;IACH,WAFY,OAAO,CAIlB;IAED;;OAEG;IACH,cAGC;IAED;;;OAGG;IACH,+DAFY,OAAO,cAAc,EAAE,MAAM,CAKxC;IAED;;OAEG;IACH,cAFW,KAAK,CAAC,CAAC,CAAC,QAOlB;CACF"}
|
package/structs/RBush.js
CHANGED
|
@@ -7,12 +7,8 @@ import {getUid} from '../util.js';
|
|
|
7
7
|
import {isEmpty} from '../obj.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* @typedef {
|
|
11
|
-
* @
|
|
12
|
-
* @property {number} minY MinY.
|
|
13
|
-
* @property {number} maxX MaxX.
|
|
14
|
-
* @property {number} maxY MaxY.
|
|
15
|
-
* @property {Object} [value] Value.
|
|
10
|
+
* @typedef {import("rbush").BBox & {value: T}} Entry
|
|
11
|
+
* @template T
|
|
16
12
|
*/
|
|
17
13
|
|
|
18
14
|
/**
|
|
@@ -20,7 +16,7 @@ import {isEmpty} from '../obj.js';
|
|
|
20
16
|
* Wrapper around the RBush by Vladimir Agafonkin.
|
|
21
17
|
* See https://github.com/mourner/rbush.
|
|
22
18
|
*
|
|
23
|
-
* @template T
|
|
19
|
+
* @template {Object} T
|
|
24
20
|
*/
|
|
25
21
|
class RBush {
|
|
26
22
|
/**
|
|
@@ -29,6 +25,7 @@ class RBush {
|
|
|
29
25
|
constructor(maxEntries) {
|
|
30
26
|
/**
|
|
31
27
|
* @private
|
|
28
|
+
* @type {RBush_<Entry<T>>}
|
|
32
29
|
*/
|
|
33
30
|
this.rbush_ = new RBush_(maxEntries);
|
|
34
31
|
|
|
@@ -36,7 +33,7 @@ class RBush {
|
|
|
36
33
|
* A mapping between the objects added to this rbush wrapper
|
|
37
34
|
* and the objects that are actually added to the internal rbush.
|
|
38
35
|
* @private
|
|
39
|
-
* @type {Object<string, Entry
|
|
36
|
+
* @type {Object<string, Entry<T>>}
|
|
40
37
|
*/
|
|
41
38
|
this.items_ = {};
|
|
42
39
|
}
|
|
@@ -47,7 +44,7 @@ class RBush {
|
|
|
47
44
|
* @param {T} value Value.
|
|
48
45
|
*/
|
|
49
46
|
insert(extent, value) {
|
|
50
|
-
/** @type {Entry} */
|
|
47
|
+
/** @type {Entry<T>} */
|
|
51
48
|
const item = {
|
|
52
49
|
minX: extent[0],
|
|
53
50
|
minY: extent[1],
|
|
@@ -71,7 +68,7 @@ class RBush {
|
|
|
71
68
|
const extent = extents[i];
|
|
72
69
|
const value = values[i];
|
|
73
70
|
|
|
74
|
-
/** @type {Entry} */
|
|
71
|
+
/** @type {Entry<T>} */
|
|
75
72
|
const item = {
|
|
76
73
|
minX: extent[0],
|
|
77
74
|
minY: extent[1],
|
|
@@ -131,7 +128,7 @@ class RBush {
|
|
|
131
128
|
* @return {Array<T>} All in extent.
|
|
132
129
|
*/
|
|
133
130
|
getInExtent(extent) {
|
|
134
|
-
/** @type {
|
|
131
|
+
/** @type {import("rbush").BBox} */
|
|
135
132
|
const bbox = {
|
|
136
133
|
minX: extent[0],
|
|
137
134
|
minY: extent[1],
|
|
@@ -207,7 +204,7 @@ class RBush {
|
|
|
207
204
|
}
|
|
208
205
|
|
|
209
206
|
/**
|
|
210
|
-
* @param {RBush} rbush R-Tree.
|
|
207
|
+
* @param {RBush<T>} rbush R-Tree.
|
|
211
208
|
*/
|
|
212
209
|
concat(rbush) {
|
|
213
210
|
this.rbush_.load(rbush.rbush_.all());
|
package/util.js
CHANGED