bruce-cesium 4.3.2 → 4.3.3

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.
@@ -8757,11 +8757,14 @@ var EntityLabel;
8757
8757
  // We get the pos3d and add 'n' to it, then turn it back into 2d.
8758
8758
  var lineEndPos3d = _this._pos3d.clone();
8759
8759
  var lineEndPoint = Cartographic.fromCartesian(lineEndPos3d);
8760
- var addHeight = sizeInM > 0 ? Math.max(30, sizeInM * 1.2) : null;
8761
- // Calculate based on camera height.
8760
+ // If known then calculate based on size.
8761
+ // If we're close then we'll favour the distance over the size.
8762
+ var addHeight = sizeInM > 0 ? Math.max(5, Math.min(distance / 5, sizeInM * 1.2)) : null;
8763
+ // If unknown then calculate based on camera height or distance.
8762
8764
  // Radius is unknown for Tileset things. We could bake the radius in possibly as a feature property.
8765
+ // We have to make it work for both labels against tall skyscrapers, and up-close assembly models.
8763
8766
  if (addHeight == null) {
8764
- addHeight = Math.max(30, _this.viewer.camera.positionCartographic.height / 3);
8767
+ addHeight = Math.max(5, Math.min(distance, _this.viewer.camera.positionCartographic.height) / 5);
8765
8768
  }
8766
8769
  lineEndPoint.height += addHeight;
8767
8770
  lineEndPos3d = Cartographic.toCartesian(lineEndPoint);
@@ -26500,7 +26503,7 @@ var ViewerUtils;
26500
26503
  ViewerUtils.AssertIonToken = AssertIonToken;
26501
26504
  })(ViewerUtils || (ViewerUtils = {}));
26502
26505
 
26503
- var VERSION = "4.3.2";
26506
+ var VERSION = "4.3.3";
26504
26507
 
26505
26508
  export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, GoogleSearchRenderManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, CESIUM_TIMELINE_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, CesiumAnimatedProperty, CesiumAnimatedInOut, Draw3dPolygon, Draw3dPolyline, MeasureCreator, Widget, VIEWER_BOOKMARKS_WIDGET_KEY, WidgetBookmarks, WidgetBranding, WidgetCursorBar, WidgetEmbeddedInfoView, WidgetInfoView, WidgetNavCompass$$1 as WidgetNavCompass, WidgetSearchBar, VIEWER_LEFT_PANEL_WIDGET_KEY, VIEWER_LEFT_PANEL_CSS_VAR_LEFT, WidgetLeftPanel, WidgetLeftPanelTab, WidgetLeftPanelTabBookmarks };
26506
26509
  //# sourceMappingURL=bruce-cesium.es5.js.map