bruce-cesium 4.3.3 → 4.3.4
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/bruce-cesium.es5.js +25 -11
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +23 -9
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/rendering/render-managers/common/entity-label.js +22 -8
- package/dist/lib/rendering/render-managers/common/entity-label.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -8742,14 +8742,28 @@
|
|
|
8742
8742
|
// We get the pos3d and add 'n' to it, then turn it back into 2d.
|
|
8743
8743
|
var lineEndPos3d = _this._pos3d.clone();
|
|
8744
8744
|
var lineEndPoint = Cesium.Cartographic.fromCartesian(lineEndPos3d);
|
|
8745
|
-
|
|
8746
|
-
// If we're
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8745
|
+
var addHeight = null;
|
|
8746
|
+
// If we're pre-positioned that means the user is hovering over the entity.
|
|
8747
|
+
// We will keep the height low to avoid looking goofy.
|
|
8748
|
+
if (_this.prePositioned) {
|
|
8749
|
+
addHeight = distance / 12;
|
|
8750
|
+
}
|
|
8751
|
+
else {
|
|
8752
|
+
// If known then calculate based on size.
|
|
8753
|
+
// If we're close then we'll favour the distance over the size.
|
|
8754
|
+
if (sizeInM && sizeInM > 0) {
|
|
8755
|
+
addHeight = Math.min(distance / 5, sizeInM * 1.2);
|
|
8756
|
+
}
|
|
8757
|
+
// If unknown then calculate based on camera height or distance.
|
|
8758
|
+
// Radius is unknown for Tileset things. We could bake the radius in possibly as a feature property.
|
|
8759
|
+
// We have to make it work for both labels against tall skyscrapers, and up-close assembly models.
|
|
8760
|
+
else {
|
|
8761
|
+
addHeight = Math.min(distance, _this.viewer.camera.positionCartographic.height) / 7;
|
|
8762
|
+
}
|
|
8763
|
+
}
|
|
8764
|
+
// Safety check.
|
|
8765
|
+
if (!addHeight || addHeight <= 0) {
|
|
8766
|
+
addHeight = 0.001;
|
|
8753
8767
|
}
|
|
8754
8768
|
lineEndPoint.height += addHeight;
|
|
8755
8769
|
lineEndPos3d = Cesium.Cartographic.toCartesian(lineEndPoint);
|
|
@@ -26426,7 +26440,7 @@
|
|
|
26426
26440
|
ViewerUtils.AssertIonToken = AssertIonToken;
|
|
26427
26441
|
})(exports.ViewerUtils || (exports.ViewerUtils = {}));
|
|
26428
26442
|
|
|
26429
|
-
var VERSION = "4.3.
|
|
26443
|
+
var VERSION = "4.3.4";
|
|
26430
26444
|
|
|
26431
26445
|
exports.VERSION = VERSION;
|
|
26432
26446
|
exports.CesiumParabola = CesiumParabola;
|