bruce-cesium 3.5.9 → 3.6.0

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.
@@ -1,6 +1,6 @@
1
1
  import { BruceEvent, Cartes, Carto, Entity as Entity$1, Geometry, Tileset, MathUtils, LRUCache, ProjectViewTile, DelayQueue, ZoomControl, Style, EntityTag, Calculator, EntityLod, EntityType, ClientFile, ObjectUtils, Bounds, Api, EntityRelationType, ENVIRONMENT, EntityCoords, EntitySource, MenuItem, EntityRelation, ProgramKey, AbstractApi, ProjectViewBookmark, EntityAttachment, EntityAttachmentType, EntityAttribute, ProjectView, ProjectViewLegacyTile, Camera } from 'bruce-models';
2
2
  import * as Cesium from 'cesium';
3
- import { Cartographic, JulianDate, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, DistanceDisplayCondition, NearFarScalar, Model, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, ColorMaterialProperty, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, OrthographicFrustum, EasingFunction, SceneTransforms, EllipsoidTerrainProvider, CesiumInspector, defined, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, Cesium3DTileset, Matrix4, Matrix3, IonResource, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect } from 'cesium';
3
+ import { Cartographic, Cartesian2, Math as Math$1, Cartesian3, CallbackProperty, Color, HeightReference, Rectangle, JulianDate, DistanceDisplayCondition, NearFarScalar, Model, Entity, HorizontalOrigin, VerticalOrigin, ClassificationType, ArcType, CornerType, ShadowMode, PolygonHierarchy, PolylineGraphics, HeadingPitchRoll, Transforms, ColorBlendMode, Primitive, Cesium3DTileFeature, SceneMode, GeoJsonDataSource, ColorMaterialProperty, Cesium3DTileColorBlendMode, HeadingPitchRange, Ion, Cesium3DTileStyle, KmlDataSource, SceneTransforms, OrthographicFrustum, EasingFunction, Cesium3DTileset, Matrix4, Matrix3, IonResource, EllipsoidTerrainProvider, CesiumInspector, defined, BingMapsImageryProvider, BingMapsStyle, MapboxImageryProvider, MapboxStyleImageryProvider, ArcGisMapServerImageryProvider, OpenStreetMapImageryProvider, GridImageryProvider, GeographicTilingScheme, ImageryLayer, UrlTemplateImageryProvider, TileMapServiceImageryProvider, IonImageryProvider, CesiumTerrainProvider, EllipsoidGeodesic, sampleTerrainMostDetailed, PolygonPipeline, BoundingSphere, GeometryInstance, ModelGraphics, PolygonGraphics, CorridorGraphics, PointGraphics, BillboardGraphics, EllipseGraphics, ScreenSpaceEventHandler, ScreenSpaceEventType, Intersect } from 'cesium';
4
4
 
5
5
  /*! *****************************************************************************
6
6
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -16173,9 +16173,11 @@ var Draw3dPolyline = /** @class */ (function () {
16173
16173
  this.hideLine = false;
16174
16174
  this.perPositionHeight = false;
16175
16175
  this.smoothing = false;
16176
+ this.maxPoints = -1;
16176
16177
  this.viewer = params.viewer;
16177
16178
  this.onFinish = params.onFinish;
16178
16179
  this.onChange = params.onChange;
16180
+ this.maxPoints = isNaN(+params.maxPoints) ? -1 : +params.maxPoints;
16179
16181
  if (params.perPositionHeight) {
16180
16182
  this.perPositionHeight = params.perPositionHeight;
16181
16183
  }
@@ -16192,6 +16194,13 @@ var Draw3dPolyline = /** @class */ (function () {
16192
16194
  this.smoothing = params.smoothing;
16193
16195
  }
16194
16196
  }
16197
+ Object.defineProperty(Draw3dPolyline.prototype, "hasReachedMax", {
16198
+ get: function () {
16199
+ return this.maxPoints > 0 && this.points.length >= this.maxPoints;
16200
+ },
16201
+ enumerable: false,
16202
+ configurable: true
16203
+ });
16195
16204
  Draw3dPolyline.prototype.Start = function () {
16196
16205
  this.createEntity();
16197
16206
  this.points.forEach(function (x) {
@@ -16277,7 +16286,7 @@ var Draw3dPolyline = /** @class */ (function () {
16277
16286
  };
16278
16287
  Draw3dPolyline.prototype.onMouseClick = function (pos2d) {
16279
16288
  var _a;
16280
- if (!this.draggingPoint) {
16289
+ if (!this.draggingPoint && !this.hasReachedMax) {
16281
16290
  var pos3d = DrawingUtils.GetAccuratePosition(this.viewer, pos2d);
16282
16291
  if (Cartes.ValidateCartes3(pos3d)) {
16283
16292
  var positions = this.GetPositions();
@@ -21681,7 +21690,7 @@ var ViewRenderEngine;
21681
21690
  ViewRenderEngine.Render = Render;
21682
21691
  })(ViewRenderEngine || (ViewRenderEngine = {}));
21683
21692
 
21684
- var VERSION = "3.5.9";
21693
+ var VERSION = "3.6.0";
21685
21694
 
21686
21695
  export { VERSION, CesiumViewMonitor, ViewerUtils, MenuItemManager, EntityRenderEngine, MenuItemCreator, VisualsRegister, RenderManager, EntitiesIdsRenderManager, EntitiesLoadedRenderManager, EntitiesRenderManager, EntityRenderManager, TilesetCadRenderManager, TilesetArbRenderManager, TilesetEntitiesRenderManager, TilesetOsmRenderManager, TilesetPointcloudRenderManager, TilesetGooglePhotosRenderManager, DataSourceStaticKmlManager, RelationsRenderManager, SharedGetters, CesiumParabola, EntityLabel, ViewRenderEngine, TileRenderEngine, TilesetRenderEngine, CESIUM_INSPECTOR_KEY, ViewUtils, DrawingUtils, MeasureUtils, EntityUtils, CesiumEntityStyler, Draw3dPolygon, Draw3dPolyline };
21687
21696
  //# sourceMappingURL=bruce-cesium.es5.js.map