ol 9.2.5-dev.1718182619798 → 9.2.5-dev.1718470218102

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.
Files changed (58) hide show
  1. package/Tile.d.ts +4 -4
  2. package/Tile.js +2 -2
  3. package/VectorTile.d.ts +1 -1
  4. package/VectorTile.js +1 -1
  5. package/color.js +2 -2
  6. package/dist/ol.js +2 -2
  7. package/dist/ol.js.map +1 -1
  8. package/events/condition.d.ts +2 -2
  9. package/events/condition.js +1 -1
  10. package/expr/cpu.d.ts.map +1 -1
  11. package/expr/cpu.js +2 -16
  12. package/expr/expression.d.ts +7 -14
  13. package/expr/expression.d.ts.map +1 -1
  14. package/expr/expression.js +388 -508
  15. package/expr/gpu.d.ts.map +1 -1
  16. package/expr/gpu.js +1 -14
  17. package/featureloader.d.ts +2 -2
  18. package/featureloader.js +1 -1
  19. package/interaction/DragBox.d.ts +2 -2
  20. package/interaction/DragBox.js +2 -2
  21. package/interaction/DragPan.d.ts +2 -2
  22. package/interaction/DragPan.js +1 -1
  23. package/interaction/DragRotate.d.ts +3 -3
  24. package/interaction/DragRotate.js +2 -2
  25. package/interaction/DragRotateAndZoom.d.ts +2 -2
  26. package/interaction/DragRotateAndZoom.js +1 -1
  27. package/interaction/DragZoom.d.ts +3 -3
  28. package/interaction/DragZoom.js +2 -2
  29. package/interaction/Draw.d.ts +3 -3
  30. package/interaction/Draw.js +3 -3
  31. package/interaction/Extent.d.ts +1 -1
  32. package/interaction/Extent.js +1 -1
  33. package/interaction/KeyboardPan.d.ts +2 -2
  34. package/interaction/KeyboardPan.js +1 -1
  35. package/interaction/KeyboardZoom.d.ts +2 -2
  36. package/interaction/KeyboardZoom.js +1 -1
  37. package/interaction/Modify.d.ts +6 -6
  38. package/interaction/Modify.js +3 -3
  39. package/interaction/MouseWheelZoom.d.ts +2 -2
  40. package/interaction/MouseWheelZoom.js +1 -1
  41. package/interaction/Select.d.ts +12 -12
  42. package/interaction/Select.js +6 -6
  43. package/interaction/Translate.d.ts +8 -8
  44. package/interaction/Translate.js +4 -4
  45. package/package.json +1 -1
  46. package/render/canvas/style.d.ts.map +1 -1
  47. package/render/canvas/style.js +6 -5
  48. package/source/Cluster.d.ts +2 -2
  49. package/source/Cluster.js +1 -1
  50. package/source/Vector.d.ts +2 -2
  51. package/source/Vector.js +2 -2
  52. package/style/Fill.d.ts +1 -1
  53. package/style/Fill.js +1 -1
  54. package/style/Style.d.ts +4 -4
  55. package/style/Style.js +2 -2
  56. package/util.js +1 -1
  57. package/webgl/styleparser.d.ts.map +1 -1
  58. package/webgl/styleparser.js +54 -66
package/expr/gpu.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"gpu.d.ts","sourceRoot":"","sources":["gpu.js"],"names":[],"mappings":"AAiCA;;;;GAIG;AACH,gCAHW,MAAM,GACL,MAAM,CAKjB;AAED;;;;GAIG;AACH,mCAHW,MAAM,MAAM,CAAC,GACZ,MAAM,CASjB;AAED;;;;;;GAMG;AACH,mCALW,MAAM,GAAC,OAAO,aAAa,EAAE,KAAK,GAGjC,MAAM,CAYjB;AAED;;;;GAIG;AACH,iCAHW,MAAM,GAAC,OAAO,YAAY,EAAE,IAAI,GAC/B,MAAM,CAKjB;AAMD;;;;GAIG;AACH,kDAHW,MAAM,GACL,MAAM,CAOjB;AAED;;;;;;GAMG;AACH,qCAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;GAIG;AACH,qDAHW,MAAM,GACL,MAAM,CAIjB;AAED;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AAEH;;;;;GAKG;AAEH;;;;;GAKG;AAEH;;;;;;;;;GASG;AAEH;;GAEG;AACH,yCAFY,kBAAkB,CAW7B;AAMD;;GAEG;AAEH;;;GAGG;AAEH;;;;;;GAMG;AACH,yCANW,OAAO,iBAAiB,EAAE,iBAAiB,QAC3C,MAAM,kBACN,OAAO,iBAAiB,EAAE,cAAc,sBACxC,kBAAkB,GACjB,kBAAkB,CAoB7B;AApCD,wDAAyD;6BApD5C,OAAO,iBAAiB,EAAE,cAAc;yBAIxC,OAAO,iBAAiB,EAAE,UAAU;gCAIpC,OAAO,iBAAiB,EAAE,iBAAiB;;;;;UAK1C,MAAM;;;;UACN,MAAM;;;;wBACG,OAAO,eAAe,EAAE,WAAW;;;;;;UAK5C,MAAM;;;;UACN,MAAM;;;;;;;;;;;;;;;YAOC,MAAM,GAAE,0BAA0B;;;;;;YAClC,MAAM,GAAE,0BAA0B;;;;;;YAClC,MAAM,GAAE,MAAM;;;;;;;;;;;;;WAGrB,OAAO,mBAAmB,EAAE,UAAU;;iCAsBvC,MAAM;;;;8BAIG,kBAAkB,QAAE,cAAc,QAAE,MAAM,KAAG,MAAM;2BAnL9C,4BAA4B;+BAgBhD,iBAAiB"}
1
+ {"version":3,"file":"gpu.d.ts","sourceRoot":"","sources":["gpu.js"],"names":[],"mappings":"AA8BA;;;;GAIG;AACH,gCAHW,MAAM,GACL,MAAM,CAKjB;AAED;;;;GAIG;AACH,mCAHW,MAAM,MAAM,CAAC,GACZ,MAAM,CASjB;AAED;;;;;;GAMG;AACH,mCALW,MAAM,GAAC,OAAO,aAAa,EAAE,KAAK,GAGjC,MAAM,CAYjB;AAED;;;;GAIG;AACH,iCAHW,MAAM,GAAC,OAAO,YAAY,EAAE,IAAI,GAC/B,MAAM,CAKjB;AAMD;;;;GAIG;AACH,kDAHW,MAAM,GACL,MAAM,CAOjB;AAED;;;;;;GAMG;AACH,qCAHW,MAAM,GACL,MAAM,CAIjB;AAED;;;;GAIG;AACH,qDAHW,MAAM,GACL,MAAM,CAIjB;AAED;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AAEH;;;;;GAKG;AAEH;;;;;GAKG;AAEH;;;;;;;;;GASG;AAEH;;GAEG;AACH,yCAFY,kBAAkB,CAW7B;AAMD;;GAEG;AAEH;;;GAGG;AAEH;;;;;;GAMG;AACH,yCANW,OAAO,iBAAiB,EAAE,iBAAiB,QAC3C,MAAM,kBACN,OAAO,iBAAiB,EAAE,cAAc,sBACxC,kBAAkB,GACjB,kBAAkB,CAU7B;AA1BD,wDAAyD;6BApD5C,OAAO,iBAAiB,EAAE,cAAc;yBAIxC,OAAO,iBAAiB,EAAE,UAAU;gCAIpC,OAAO,iBAAiB,EAAE,iBAAiB;;;;;UAK1C,MAAM;;;;UACN,MAAM;;;;wBACG,OAAO,eAAe,EAAE,WAAW;;;;;;UAK5C,MAAM;;;;UACN,MAAM;;;;;;;;;;;;;;;YAOC,MAAM,GAAE,0BAA0B;;;;;;YAClC,MAAM,GAAE,0BAA0B;;;;;;YAClC,MAAM,GAAE,MAAM;;;;;;;;;;;;;WAGrB,OAAO,mBAAmB,EAAE,UAAU;;iCAsBvC,MAAM;;;;8BAIG,kBAAkB,QAAE,cAAc,QAAE,MAAM,KAAG,MAAM;2BAhL9C,4BAA4B;+BAahD,iBAAiB"}
package/expr/gpu.js CHANGED
@@ -6,15 +6,12 @@ import {
6
6
  BooleanType,
7
7
  CallExpression,
8
8
  ColorType,
9
- NoneType,
10
9
  NumberArrayType,
11
10
  NumberType,
12
11
  Ops,
13
12
  SizeType,
14
13
  StringType,
15
14
  computeGeometryType,
16
- isType,
17
- overlapsType,
18
15
  parse,
19
16
  typeName,
20
17
  } from './expression.js';
@@ -197,17 +194,7 @@ export function buildExpression(
197
194
  parsingContext,
198
195
  compilationContext,
199
196
  ) {
200
- const expression = parse(encoded, parsingContext, type);
201
- if (isType(expression.type, NoneType)) {
202
- throw new Error(`No matching type was found`);
203
- }
204
- if (!overlapsType(type, expression.type)) {
205
- const expected = typeName(type);
206
- const actual = typeName(expression.type);
207
- throw new Error(
208
- `Expected expression to be of type ${expected}, got ${actual}`,
209
- );
210
- }
197
+ const expression = parse(encoded, type, parsingContext);
211
198
  return compile(expression, type, compilationContext);
212
199
  }
213
200
 
@@ -3,7 +3,7 @@
3
3
  * load features.
4
4
  *
5
5
  * This function takes up to 5 arguments. These are an {@link module:ol/extent~Extent} representing
6
- * the area to be loaded, a `{number}` representing the resolution (map units per pixel), an
6
+ * the area to be loaded, a `{number}` representing the resolution (map units per pixel), a
7
7
  * {@link module:ol/proj/Projection~Projection} for the projection, an optional success callback that should get
8
8
  * the loaded features passed as an argument and an optional failure callback with no arguments. If
9
9
  * the callbacks are not used, the corresponding vector source will not fire `'featuresloadend'` and
@@ -70,7 +70,7 @@ export function setWithCredentials(xhrWithCredentials: boolean): void;
70
70
  * load features.
71
71
  *
72
72
  * This function takes up to 5 arguments. These are an {@link module :ol/extent~Extent} representing
73
- * the area to be loaded, a `{number}` representing the resolution (map units per pixel), an
73
+ * the area to be loaded, a `{number}` representing the resolution (map units per pixel), a
74
74
  * {@link module :ol/proj/Projection~Projection} for the projection, an optional success callback that should get
75
75
  * the loaded features passed as an argument and an optional failure callback with no arguments. If
76
76
  * the callbacks are not used, the corresponding vector source will not fire `'featuresloadend'` and
package/featureloader.js CHANGED
@@ -15,7 +15,7 @@ let withCredentials = false;
15
15
  * load features.
16
16
  *
17
17
  * This function takes up to 5 arguments. These are an {@link module:ol/extent~Extent} representing
18
- * the area to be loaded, a `{number}` representing the resolution (map units per pixel), an
18
+ * the area to be loaded, a `{number}` representing the resolution (map units per pixel), a
19
19
  * {@link module:ol/proj/Projection~Projection} for the projection, an optional success callback that should get
20
20
  * the loaded features passed as an argument and an optional failure callback with no arguments. If
21
21
  * the callbacks are not used, the corresponding vector source will not fire `'featuresloadend'` and
@@ -37,7 +37,7 @@ export type Options = {
37
37
  */
38
38
  className?: string | undefined;
39
39
  /**
40
- * A function that takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
40
+ * A function that takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
41
41
  * to indicate whether that event should be handled.
42
42
  * Default is {@link ol /events/condition~mouseActionButton}.
43
43
  */
@@ -76,7 +76,7 @@ import Event from '../events/Event.js';
76
76
  /**
77
77
  * @classdesc
78
78
  * Allows the user to draw a vector box by clicking and dragging on the map,
79
- * normally combined with an {@link module:ol/events/condition} that limits
79
+ * normally combined with a {@link module:ol/events/condition} that limits
80
80
  * it to when the shift or other key is held down. This is used, for example,
81
81
  * for zooming to a specific area of the map
82
82
  * (see {@link module:ol/interaction/DragZoom~DragZoom} and
@@ -17,7 +17,7 @@ import {mouseActionButton} from '../events/condition.js';
17
17
  /**
18
18
  * @typedef {Object} Options
19
19
  * @property {string} [className='ol-dragbox'] CSS class name for styling the box.
20
- * @property {import("../events/condition.js").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
20
+ * @property {import("../events/condition.js").Condition} [condition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
21
21
  * to indicate whether that event should be handled.
22
22
  * Default is {@link ol/events/condition~mouseActionButton}.
23
23
  * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default
@@ -106,7 +106,7 @@ export class DragBoxEvent extends Event {
106
106
  /**
107
107
  * @classdesc
108
108
  * Allows the user to draw a vector box by clicking and dragging on the map,
109
- * normally combined with an {@link module:ol/events/condition} that limits
109
+ * normally combined with a {@link module:ol/events/condition} that limits
110
110
  * it to when the shift or other key is held down. This is used, for example,
111
111
  * for zooming to a specific area of the map
112
112
  * (see {@link module:ol/interaction/DragZoom~DragZoom} and
@@ -1,7 +1,7 @@
1
1
  export default DragPan;
2
2
  export type Options = {
3
3
  /**
4
- * A function that takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
4
+ * A function that takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
5
5
  * to indicate whether that event should be handled.
6
6
  * Default is {@link module :ol/events/condition.noModifierKeys} and {@link module :ol/events/condition.primaryAction}.
7
7
  */
@@ -18,7 +18,7 @@ export type Options = {
18
18
  };
19
19
  /**
20
20
  * @typedef {Object} Options
21
- * @property {import("../events/condition.js").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
21
+ * @property {import("../events/condition.js").Condition} [condition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
22
22
  * to indicate whether that event should be handled.
23
23
  * Default is {@link module:ol/events/condition.noModifierKeys} and {@link module:ol/events/condition.primaryAction}.
24
24
  * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,
@@ -19,7 +19,7 @@ import {
19
19
 
20
20
  /**
21
21
  * @typedef {Object} Options
22
- * @property {import("../events/condition.js").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
22
+ * @property {import("../events/condition.js").Condition} [condition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
23
23
  * to indicate whether that event should be handled.
24
24
  * Default is {@link module:ol/events/condition.noModifierKeys} and {@link module:ol/events/condition.primaryAction}.
25
25
  * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,
@@ -1,7 +1,7 @@
1
1
  export default DragRotate;
2
2
  export type Options = {
3
3
  /**
4
- * A function that takes an
4
+ * A function that takes a
5
5
  * {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
6
6
  * to indicate whether that event should be handled.
7
7
  * Default is {@link module :ol/events/condition.altShiftKeysOnly}.
@@ -14,7 +14,7 @@ export type Options = {
14
14
  };
15
15
  /**
16
16
  * @typedef {Object} Options
17
- * @property {import("../events/condition.js").Condition} [condition] A function that takes an
17
+ * @property {import("../events/condition.js").Condition} [condition] A function that takes a
18
18
  * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
19
19
  * to indicate whether that event should be handled.
20
20
  * Default is {@link module:ol/events/condition.altShiftKeysOnly}.
@@ -23,7 +23,7 @@ export type Options = {
23
23
  /**
24
24
  * @classdesc
25
25
  * Allows the user to rotate the map by clicking and dragging on the map,
26
- * normally combined with an {@link module:ol/events/condition} that limits
26
+ * normally combined with a {@link module:ol/events/condition} that limits
27
27
  * it to when the alt and shift keys are held down.
28
28
  *
29
29
  * This interaction is only supported for mouse devices.
@@ -12,7 +12,7 @@ import {disable} from '../rotationconstraint.js';
12
12
 
13
13
  /**
14
14
  * @typedef {Object} Options
15
- * @property {import("../events/condition.js").Condition} [condition] A function that takes an
15
+ * @property {import("../events/condition.js").Condition} [condition] A function that takes a
16
16
  * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean
17
17
  * to indicate whether that event should be handled.
18
18
  * Default is {@link module:ol/events/condition.altShiftKeysOnly}.
@@ -22,7 +22,7 @@ import {disable} from '../rotationconstraint.js';
22
22
  /**
23
23
  * @classdesc
24
24
  * Allows the user to rotate the map by clicking and dragging on the map,
25
- * normally combined with an {@link module:ol/events/condition} that limits
25
+ * normally combined with a {@link module:ol/events/condition} that limits
26
26
  * it to when the alt and shift keys are held down.
27
27
  *
28
28
  * This interaction is only supported for mouse devices.
@@ -2,7 +2,7 @@ export default DragRotateAndZoom;
2
2
  export type Options = {
3
3
  /**
4
4
  * A function that
5
- * takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
5
+ * takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
6
6
  * boolean to indicate whether that event should be handled.
7
7
  * Default is {@link module :ol/events/condition.shiftKeyOnly}.
8
8
  */
@@ -15,7 +15,7 @@ export type Options = {
15
15
  /**
16
16
  * @typedef {Object} Options
17
17
  * @property {import("../events/condition.js").Condition} [condition] A function that
18
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
18
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
19
19
  * boolean to indicate whether that event should be handled.
20
20
  * Default is {@link module:ol/events/condition.shiftKeyOnly}.
21
21
  * @property {number} [duration=400] Animation duration in milliseconds.
@@ -7,7 +7,7 @@ import {mouseOnly, shiftKeyOnly} from '../events/condition.js';
7
7
  /**
8
8
  * @typedef {Object} Options
9
9
  * @property {import("../events/condition.js").Condition} [condition] A function that
10
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
10
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
11
11
  * boolean to indicate whether that event should be handled.
12
12
  * Default is {@link module:ol/events/condition.shiftKeyOnly}.
13
13
  * @property {number} [duration=400] Animation duration in milliseconds.
@@ -7,7 +7,7 @@ export type Options = {
7
7
  className?: string | undefined;
8
8
  /**
9
9
  * A function that
10
- * takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
10
+ * takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
11
11
  * boolean to indicate whether that event should be handled.
12
12
  * Default is {@link module :ol/events/condition.shiftKeyOnly}.
13
13
  */
@@ -31,7 +31,7 @@ export type Options = {
31
31
  * @property {string} [className='ol-dragzoom'] CSS class name for styling the
32
32
  * box.
33
33
  * @property {import("../events/condition.js").Condition} [condition] A function that
34
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
34
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
35
35
  * boolean to indicate whether that event should be handled.
36
36
  * Default is {@link module:ol/events/condition.shiftKeyOnly}.
37
37
  * @property {number} [duration=200] Animation duration in milliseconds.
@@ -42,7 +42,7 @@ export type Options = {
42
42
  /**
43
43
  * @classdesc
44
44
  * Allows the user to zoom the map by clicking and dragging on the map,
45
- * normally combined with an {@link module:ol/events/condition} that limits
45
+ * normally combined with a {@link module:ol/events/condition} that limits
46
46
  * it to when a key, shift by default, is held down.
47
47
  *
48
48
  * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or
@@ -10,7 +10,7 @@ import {shiftKeyOnly} from '../events/condition.js';
10
10
  * @property {string} [className='ol-dragzoom'] CSS class name for styling the
11
11
  * box.
12
12
  * @property {import("../events/condition.js").Condition} [condition] A function that
13
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
13
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
14
14
  * boolean to indicate whether that event should be handled.
15
15
  * Default is {@link module:ol/events/condition.shiftKeyOnly}.
16
16
  * @property {number} [duration=200] Animation duration in milliseconds.
@@ -22,7 +22,7 @@ import {shiftKeyOnly} from '../events/condition.js';
22
22
  /**
23
23
  * @classdesc
24
24
  * Allows the user to zoom the map by clicking and dragging on the map,
25
- * normally combined with an {@link module:ol/events/condition} that limits
25
+ * normally combined with a {@link module:ol/events/condition} that limits
26
26
  * it to when a key, shift by default, is held down.
27
27
  *
28
28
  * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or
@@ -91,7 +91,7 @@ export type Options = {
91
91
  minPoints?: number | undefined;
92
92
  /**
93
93
  * A function
94
- * that takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
94
+ * that takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
95
95
  * boolean to indicate whether the drawing can be finished. Not used when drawing
96
96
  * POINT or MULTI_POINT geometries.
97
97
  */
@@ -119,7 +119,7 @@ export type Options = {
119
119
  geometryName?: string | undefined;
120
120
  /**
121
121
  * A function that
122
- * takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
122
+ * takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
123
123
  * boolean to indicate whether that event should be handled.
124
124
  * By default {@link module :ol/events/condition.noModifierKeys}, i.e. a click,
125
125
  * adds a vertex or deactivates freehand drawing.
@@ -133,7 +133,7 @@ export type Options = {
133
133
  freehand?: boolean | undefined;
134
134
  /**
135
135
  * Condition that activates freehand drawing for lines and polygons. This
136
- * function takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and
136
+ * function takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and
137
137
  * returns a boolean to indicate whether that event should be handled. The
138
138
  * default is {@link module :ol/events/condition.shiftKeyOnly}, meaning that the
139
139
  * Shift key activates freehand drawing.
@@ -67,7 +67,7 @@ import {getStrideForLayout} from '../geom/SimpleGeometry.js';
67
67
  * before a polygon ring or line string can be finished. Default is `3` for
68
68
  * polygon rings and `2` for line strings.
69
69
  * @property {import("../events/condition.js").Condition} [finishCondition] A function
70
- * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
70
+ * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
71
71
  * boolean to indicate whether the drawing can be finished. Not used when drawing
72
72
  * POINT or MULTI_POINT geometries.
73
73
  * @property {import("../style/Style.js").StyleLike|import("../style/flat.js").FlatStyleLike} [style]
@@ -85,7 +85,7 @@ import {getStrideForLayout} from '../geom/SimpleGeometry.js';
85
85
  * @property {string} [geometryName] Geometry name to use for features created
86
86
  * by the draw interaction.
87
87
  * @property {import("../events/condition.js").Condition} [condition] A function that
88
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
88
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
89
89
  * boolean to indicate whether that event should be handled.
90
90
  * By default {@link module:ol/events/condition.noModifierKeys}, i.e. a click,
91
91
  * adds a vertex or deactivates freehand drawing.
@@ -94,7 +94,7 @@ import {getStrideForLayout} from '../geom/SimpleGeometry.js';
94
94
  * mode and takes precedence over any `freehandCondition` option.
95
95
  * @property {import("../events/condition.js").Condition} [freehandCondition]
96
96
  * Condition that activates freehand drawing for lines and polygons. This
97
- * function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and
97
+ * function takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and
98
98
  * returns a boolean to indicate whether that event should be handled. The
99
99
  * default is {@link module:ol/events/condition.shiftKeyOnly}, meaning that the
100
100
  * Shift key activates freehand drawing.
@@ -19,7 +19,7 @@ export default Extent;
19
19
  export type Options = {
20
20
  /**
21
21
  * A function that
22
- * takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
22
+ * takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
23
23
  * boolean to indicate whether that event should be handled.
24
24
  * Default is {@link module :ol/events/condition.always}.
25
25
  */
@@ -23,7 +23,7 @@ import {toUserExtent} from '../proj.js';
23
23
  /**
24
24
  * @typedef {Object} Options
25
25
  * @property {import("../events/condition.js").Condition} [condition] A function that
26
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
26
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
27
27
  * boolean to indicate whether that event should be handled.
28
28
  * Default is {@link module:ol/events/condition.always}.
29
29
  * @property {import("../extent.js").Extent} [extent] Initial extent. Defaults to no
@@ -2,7 +2,7 @@ export default KeyboardPan;
2
2
  export type Options = {
3
3
  /**
4
4
  * A function that
5
- * takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
5
+ * takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
6
6
  * boolean to indicate whether that event should be handled. Default is
7
7
  * {@link module :ol/events/condition.noModifierKeys} and
8
8
  * {@link module :ol/events/condition.targetNotEditable}.
@@ -21,7 +21,7 @@ export type Options = {
21
21
  /**
22
22
  * @typedef {Object} Options
23
23
  * @property {import("../events/condition.js").Condition} [condition] A function that
24
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
24
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
25
25
  * boolean to indicate whether that event should be handled. Default is
26
26
  * {@link module:ol/events/condition.noModifierKeys} and
27
27
  * {@link module:ol/events/condition.targetNotEditable}.
@@ -10,7 +10,7 @@ import {rotate as rotateCoordinate} from '../coordinate.js';
10
10
  /**
11
11
  * @typedef {Object} Options
12
12
  * @property {import("../events/condition.js").Condition} [condition] A function that
13
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
13
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
14
14
  * boolean to indicate whether that event should be handled. Default is
15
15
  * {@link module:ol/events/condition.noModifierKeys} and
16
16
  * {@link module:ol/events/condition.targetNotEditable}.
@@ -6,7 +6,7 @@ export type Options = {
6
6
  duration?: number | undefined;
7
7
  /**
8
8
  * A function that
9
- * takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
9
+ * takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
10
10
  * boolean to indicate whether that event should be handled. The default condition is
11
11
  * that {@link module :ol/events/condition.targetNotEditable} is fulfilled and that
12
12
  * the platform modifier key isn't pressed
@@ -22,7 +22,7 @@ export type Options = {
22
22
  * @typedef {Object} Options
23
23
  * @property {number} [duration=100] Animation duration in milliseconds.
24
24
  * @property {import("../events/condition.js").Condition} [condition] A function that
25
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
25
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
26
26
  * boolean to indicate whether that event should be handled. The default condition is
27
27
  * that {@link module:ol/events/condition.targetNotEditable} is fulfilled and that
28
28
  * the platform modifier key isn't pressed
@@ -9,7 +9,7 @@ import {platformModifierKey, targetNotEditable} from '../events/condition.js';
9
9
  * @typedef {Object} Options
10
10
  * @property {number} [duration=100] Animation duration in milliseconds.
11
11
  * @property {import("../events/condition.js").Condition} [condition] A function that
12
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
12
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
13
13
  * boolean to indicate whether that event should be handled. The default condition is
14
14
  * that {@link module:ol/events/condition.targetNotEditable} is fulfilled and that
15
15
  * the platform modifier key isn't pressed
@@ -10,17 +10,17 @@
10
10
  /**
11
11
  * @typedef {Object} Options
12
12
  * @property {import("../events/condition.js").Condition} [condition] A function that
13
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
13
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
14
14
  * boolean to indicate whether that event will be considered to add or move a
15
15
  * vertex to the sketch. Default is
16
16
  * {@link module:ol/events/condition.primaryAction}.
17
17
  * @property {import("../events/condition.js").Condition} [deleteCondition] A function
18
- * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
18
+ * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
19
19
  * boolean to indicate whether that event should be handled. By default,
20
20
  * {@link module:ol/events/condition.singleClick} with
21
21
  * {@link module:ol/events/condition.altKeyOnly} results in a vertex deletion.
22
22
  * @property {import("../events/condition.js").Condition} [insertVertexCondition] A
23
- * function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and
23
+ * function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and
24
24
  * returns a boolean to indicate whether a new vertex should be added to the sketch
25
25
  * features. Default is {@link module:ol/events/condition.always}.
26
26
  * @property {number} [pixelTolerance=10] Pixel tolerance for considering the
@@ -106,7 +106,7 @@ export type SegmentData = {
106
106
  export type Options = {
107
107
  /**
108
108
  * A function that
109
- * takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
109
+ * takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
110
110
  * boolean to indicate whether that event will be considered to add or move a
111
111
  * vertex to the sketch. Default is
112
112
  * {@link module :ol/events/condition.primaryAction}.
@@ -114,7 +114,7 @@ export type Options = {
114
114
  condition?: import("../events/condition.js").Condition | undefined;
115
115
  /**
116
116
  * A function
117
- * that takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
117
+ * that takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
118
118
  * boolean to indicate whether that event should be handled. By default,
119
119
  * {@link module :ol/events/condition.singleClick} with
120
120
  * {@link module :ol/events/condition.altKeyOnly} results in a vertex deletion.
@@ -122,7 +122,7 @@ export type Options = {
122
122
  deleteCondition?: import("../events/condition.js").Condition | undefined;
123
123
  /**
124
124
  * A
125
- * function that takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and
125
+ * function that takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and
126
126
  * returns a boolean to indicate whether a new vertex should be added to the sketch
127
127
  * features. Default is {@link module :ol/events/condition.always}.
128
128
  */
@@ -91,17 +91,17 @@ const ModifyEventType = {
91
91
  /**
92
92
  * @typedef {Object} Options
93
93
  * @property {import("../events/condition.js").Condition} [condition] A function that
94
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
94
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
95
95
  * boolean to indicate whether that event will be considered to add or move a
96
96
  * vertex to the sketch. Default is
97
97
  * {@link module:ol/events/condition.primaryAction}.
98
98
  * @property {import("../events/condition.js").Condition} [deleteCondition] A function
99
- * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
99
+ * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
100
100
  * boolean to indicate whether that event should be handled. By default,
101
101
  * {@link module:ol/events/condition.singleClick} with
102
102
  * {@link module:ol/events/condition.altKeyOnly} results in a vertex deletion.
103
103
  * @property {import("../events/condition.js").Condition} [insertVertexCondition] A
104
- * function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and
104
+ * function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and
105
105
  * returns a boolean to indicate whether a new vertex should be added to the sketch
106
106
  * features. Default is {@link module:ol/events/condition.always}.
107
107
  * @property {number} [pixelTolerance=10] Pixel tolerance for considering the
@@ -3,7 +3,7 @@ export type Mode = 'trackpad' | 'wheel';
3
3
  export type Options = {
4
4
  /**
5
5
  * A function that
6
- * takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
6
+ * takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
7
7
  * boolean to indicate whether that event should be handled. Default is
8
8
  * {@link module :ol/events/condition.always}.
9
9
  */
@@ -44,7 +44,7 @@ export type Options = {
44
44
  /**
45
45
  * @typedef {Object} Options
46
46
  * @property {import("../events/condition.js").Condition} [condition] A function that
47
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
47
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
48
48
  * boolean to indicate whether that event should be handled. Default is
49
49
  * {@link module:ol/events/condition.always}.
50
50
  * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,
@@ -14,7 +14,7 @@ import {clamp} from '../math.js';
14
14
  /**
15
15
  * @typedef {Object} Options
16
16
  * @property {import("../events/condition.js").Condition} [condition] A function that
17
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
17
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
18
18
  * boolean to indicate whether that event should be handled. Default is
19
19
  * {@link module:ol/events/condition.always}.
20
20
  * @property {boolean} [onFocusOnly=false] When the map's target has a `tabindex` attribute set,
@@ -1,17 +1,17 @@
1
1
  /**
2
- * A function that takes an {@link module:ol/Feature~Feature} and returns `true` if the feature may be
2
+ * A function that takes a {@link module:ol/Feature~Feature} and returns `true` if the feature may be
3
3
  * selected or `false` otherwise.
4
4
  * @typedef {function(import("../Feature.js").default, import("../layer/Layer.js").default<import("../source/Source").default>):boolean} FilterFunction
5
5
  */
6
6
  /**
7
7
  * @typedef {Object} Options
8
8
  * @property {import("../events/condition.js").Condition} [addCondition] A function
9
- * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
9
+ * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
10
10
  * boolean to indicate whether that event should be handled.
11
11
  * By default, this is {@link module:ol/events/condition.never}. Use this if you
12
12
  * want to use different events for add and remove instead of `toggle`.
13
13
  * @property {import("../events/condition.js").Condition} [condition] A function that
14
- * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
14
+ * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
15
15
  * boolean to indicate whether that event should be handled. This is the event
16
16
  * for the selected features as a whole. By default, this is
17
17
  * {@link module:ol/events/condition.singleClick}. Clicking on a feature selects that
@@ -31,12 +31,12 @@
31
31
  * any style changes for selected features.
32
32
  * If set to a falsey value, the selected feature's style will not change.
33
33
  * @property {import("../events/condition.js").Condition} [removeCondition] A function
34
- * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
34
+ * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
35
35
  * boolean to indicate whether that event should be handled.
36
36
  * By default, this is {@link module:ol/events/condition.never}. Use this if you
37
37
  * want to use different events for add and remove instead of `toggle`.
38
38
  * @property {import("../events/condition.js").Condition} [toggleCondition] A function
39
- * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
39
+ * that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
40
40
  * boolean to indicate whether that event should be handled. This is in addition
41
41
  * to the `condition` event. By default,
42
42
  * {@link module:ol/events/condition.shiftKeyOnly}, i.e. pressing `shift` as
@@ -52,7 +52,7 @@
52
52
  * used by the interaction is returned by
53
53
  * {@link module:ol/interaction/Select~Select#getFeatures}.
54
54
  * @property {FilterFunction} [filter] A function
55
- * that takes an {@link module:ol/Feature~Feature} and an
55
+ * that takes a {@link module:ol/Feature~Feature} and a
56
56
  * {@link module:ol/layer/Layer~Layer} and returns `true` if the feature may be
57
57
  * selected or `false` otherwise.
58
58
  * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside
@@ -93,14 +93,14 @@ export class SelectEvent extends Event {
93
93
  }
94
94
  export default Select;
95
95
  /**
96
- * A function that takes an {@link module :ol/Feature~Feature} and returns `true` if the feature may be
96
+ * A function that takes a {@link module :ol/Feature~Feature} and returns `true` if the feature may be
97
97
  * selected or `false` otherwise.
98
98
  */
99
99
  export type FilterFunction = (arg0: import("../Feature.js").default, arg1: import("../layer/Layer.js").default<import("../source/Source").default>) => boolean;
100
100
  export type Options = {
101
101
  /**
102
102
  * A function
103
- * that takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
103
+ * that takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
104
104
  * boolean to indicate whether that event should be handled.
105
105
  * By default, this is {@link module :ol/events/condition.never}. Use this if you
106
106
  * want to use different events for add and remove instead of `toggle`.
@@ -108,7 +108,7 @@ export type Options = {
108
108
  addCondition?: import("../events/condition.js").Condition | undefined;
109
109
  /**
110
110
  * A function that
111
- * takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
111
+ * takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
112
112
  * boolean to indicate whether that event should be handled. This is the event
113
113
  * for the selected features as a whole. By default, this is
114
114
  * {@link module :ol/events/condition.singleClick}. Clicking on a feature selects that
@@ -135,7 +135,7 @@ export type Options = {
135
135
  style?: import("../style/Style.js").StyleLike | null | undefined;
136
136
  /**
137
137
  * A function
138
- * that takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
138
+ * that takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
139
139
  * boolean to indicate whether that event should be handled.
140
140
  * By default, this is {@link module :ol/events/condition.never}. Use this if you
141
141
  * want to use different events for add and remove instead of `toggle`.
@@ -143,7 +143,7 @@ export type Options = {
143
143
  removeCondition?: import("../events/condition.js").Condition | undefined;
144
144
  /**
145
145
  * A function
146
- * that takes an {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
146
+ * that takes a {@link module :ol/MapBrowserEvent~MapBrowserEvent} and returns a
147
147
  * boolean to indicate whether that event should be handled. This is in addition
148
148
  * to the `condition` event. By default,
149
149
  * {@link module :ol/events/condition.shiftKeyOnly}, i.e. pressing `shift` as
@@ -167,7 +167,7 @@ export type Options = {
167
167
  features?: Collection<Feature<import("../geom.js").Geometry>> | undefined;
168
168
  /**
169
169
  * A function
170
- * that takes an {@link module :ol/Feature~Feature} and an
170
+ * that takes a {@link module :ol/Feature~Feature} and a
171
171
  * {@link module :ol/layer/Layer~Layer} and returns `true` if the feature may be
172
172
  * selected or `false` otherwise.
173
173
  */