zincjs 1.10.0 → 1.10.2
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/build/zinc.frontend.js +1 -1
- package/build/zinc.js +5 -4
- package/build/zinc.js.map +1 -1
- package/package.json +1 -1
- package/src/controls.js +4 -2
- package/src/primitives/markerCluster.js +7 -3
- package/src/three/Geometry.js +5 -3
package/package.json
CHANGED
package/src/controls.js
CHANGED
|
@@ -1561,8 +1561,10 @@ const RayCaster = function (sceneIn, hostSceneIn, callbackFunctionIn, hoverCallb
|
|
|
1561
1561
|
let zincObject = pickedObjects[i].object ? pickedObjects[i].object.userData : undefined;
|
|
1562
1562
|
if (zincObject && zincObject.isMarkerCluster && zincObject.visible
|
|
1563
1563
|
&& zincObject.clusterIsVisible(pickedObjects[i].object.clusterIndex)) {
|
|
1564
|
-
|
|
1565
|
-
|
|
1564
|
+
//Can zoom into cluster
|
|
1565
|
+
if (zincObject.zoomToCluster(pickedObjects[i].object.clusterIndex)) {
|
|
1566
|
+
return;
|
|
1567
|
+
}
|
|
1566
1568
|
}
|
|
1567
1569
|
}
|
|
1568
1570
|
callbackFunction(pickedObjects, x, y);
|
|
@@ -213,10 +213,14 @@ const MarkerCluster = function(sceneIn) {
|
|
|
213
213
|
if (index !== undefined && index > -1) {
|
|
214
214
|
this._v1.set(...sprites[index].min);
|
|
215
215
|
this._v2.set(...sprites[index].max);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
216
|
+
if (Math.abs(this._v1.distanceTo(this._v2) > 0.0)) {
|
|
217
|
+
this._b1.set(this._v1, this._v2);
|
|
218
|
+
scene.translateBoundingBoxToCameraView(this._b1, 3, 300);
|
|
219
|
+
this.markerUpdateRequired = true;
|
|
220
|
+
return true;
|
|
221
|
+
}
|
|
219
222
|
}
|
|
223
|
+
return false;
|
|
220
224
|
}
|
|
221
225
|
|
|
222
226
|
this.clusterIsVisible = (index) => {
|
package/src/three/Geometry.js
CHANGED
|
@@ -766,9 +766,11 @@ Geometry.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
|
|
|
766
766
|
// colors
|
|
767
767
|
|
|
768
768
|
for ( let i = 0, il = colors2.length; i < il; i ++ ) {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
769
|
+
if ((typeof colors2[ i ] === "number")) {
|
|
770
|
+
colors1.push( colors2[ i ] );
|
|
771
|
+
} else {
|
|
772
|
+
colors1.push( colors2[ i ].clone() );
|
|
773
|
+
}
|
|
772
774
|
}
|
|
773
775
|
|
|
774
776
|
// faces
|