ol 7.1.1-dev.1663614874942 → 7.1.1-dev.1664020309869

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "7.1.1-dev.1663614874942",
3
+ "version": "7.1.1-dev.1664020309869",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
@@ -1 +1 @@
1
- {"version":3,"file":"hitdetect.d.ts","sourceRoot":"","sources":["hitdetect.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;GAaG;AACH,kDAbW,OAAO,eAAe,EAAE,IAAI,cAC5B,MAAM,OAAO,oBAAoB,EAAE,SAAS,CAAC,YAG7C,MAAM,OAAO,kBAAkB,EAAE,WAAW,CAAC,iBAE7C,OAAO,sBAAsB,EAAE,aAAa,GAAC,SAAS,UAEtD,OAAO,iBAAiB,EAAE,MAAM,cAChC,MAAM,YACN,MAAM,GACL,SAAS,CA6HpB;AAED;;;;;;;;GAQG;AACH,iCARW,OAAO,aAAa,EAAE,KAAK,YAE3B,MAAM,OAAO,eAAe,EAAE,WAAW,CAAC,aAE1C,SAAS,GAER,MAAM,OAAO,eAAe,EAAE,WAAW,CAAC,CAwBrD;AA5KD,wCAAyC"}
1
+ {"version":3,"file":"hitdetect.d.ts","sourceRoot":"","sources":["hitdetect.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;GAaG;AACH,kDAbW,OAAO,eAAe,EAAE,IAAI,cAC5B,MAAM,OAAO,oBAAoB,EAAE,SAAS,CAAC,YAG7C,MAAM,OAAO,kBAAkB,EAAE,WAAW,CAAC,iBAE7C,OAAO,sBAAsB,EAAE,aAAa,GAAC,SAAS,UAEtD,OAAO,iBAAiB,EAAE,MAAM,cAChC,MAAM,YACN,MAAM,GACL,SAAS,CAyIpB;AAED;;;;;;;;GAQG;AACH,iCARW,OAAO,aAAa,EAAE,KAAK,YAE3B,MAAM,OAAO,eAAe,EAAE,WAAW,CAAC,aAE1C,SAAS,GAER,MAAM,OAAO,eAAe,EAAE,WAAW,CAAC,CAwBrD;AAxLD,wCAAyC"}
@@ -64,7 +64,7 @@ export function createHitDetectionImageData(
64
64
  styles = [styles];
65
65
  }
66
66
  const index = i * indexFactor;
67
- const color = '#' + ('000000' + index.toString(16)).slice(-6);
67
+ const color = index.toString(16).padStart(7, '#00000');
68
68
  for (let j = 0, jj = styles.length; j < jj; ++j) {
69
69
  const originalStyle = styles[j];
70
70
  const geometry = originalStyle.getGeometryFunction()(feature);
@@ -124,10 +124,22 @@ export function createHitDetectionImageData(
124
124
  byGeometryType['LineString'] = [];
125
125
  byGeometryType['Point'] = [];
126
126
  }
127
- byGeometryType[geometry.getType().replace('Multi', '')].push(
128
- geometry,
129
- style
130
- );
127
+ const type = geometry.getType();
128
+ if (type === 'GeometryCollection') {
129
+ const geometries =
130
+ /** @type {import("../../geom/GeometryCollection.js").default} */ (
131
+ geometry
132
+ ).getGeometriesArrayRecursive();
133
+ for (let i = 0, ii = geometries.length; i < ii; ++i) {
134
+ const geometry = geometries[i];
135
+ byGeometryType[geometry.getType().replace('Multi', '')].push(
136
+ geometry,
137
+ style
138
+ );
139
+ }
140
+ } else {
141
+ byGeometryType[type.replace('Multi', '')].push(geometry, style);
142
+ }
131
143
  }
132
144
  }
133
145
 
package/util.js CHANGED
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '7.1.1-dev.1663614874942';
36
+ export const VERSION = '7.1.1-dev.1664020309869';