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/dist/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/package.json +1 -1
- package/render/canvas/hitdetect.d.ts.map +1 -1
- package/render/canvas/hitdetect.js +17 -5
- package/util.js +1 -1
package/package.json
CHANGED
|
@@ -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,
|
|
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 =
|
|
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
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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