bruce-models 0.0.9 → 0.1.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.
@@ -229,12 +229,16 @@ var CacheItem = /** @class */ (function () {
229
229
  var CacheControl = /** @class */ (function () {
230
230
  function CacheControl() {
231
231
  this.data = {};
232
+ this.Disabled = false;
232
233
  }
233
234
  CacheControl.prototype.Set = function (id, data, duration) {
234
235
  if (duration === void 0) { duration = -1; }
235
236
  this.data[id + ""] = new CacheItem(id + "", data, duration);
236
237
  };
237
238
  CacheControl.prototype.Get = function (id) {
239
+ if (this.Disabled) {
240
+ return null;
241
+ }
238
242
  var item = this.data[id + ""];
239
243
  if (item == null) {
240
244
  return null;
@@ -266,9 +270,15 @@ var CacheControl = /** @class */ (function () {
266
270
  }
267
271
  };
268
272
  CacheControl.prototype.GetKeys = function () {
273
+ if (this.Disabled) {
274
+ return [];
275
+ }
269
276
  return Object.keys(this.data);
270
277
  };
271
278
  CacheControl.prototype.GetValues = function () {
279
+ if (this.Disabled) {
280
+ return [];
281
+ }
272
282
  var values = [];
273
283
  for (var key in this.data) {
274
284
  var data = this.Get(key);
@@ -3211,6 +3221,14 @@ var ClientFile;
3211
3221
  return "" + Api.ECacheKey.ClientFile + Api.ECacheKey.Id + fileId;
3212
3222
  }
3213
3223
  ClientFile.GetCacheKey = GetCacheKey;
3224
+ function GetUrl(api, fileId) {
3225
+ return api.GetBaseUrl() + "/file/" + fileId;
3226
+ }
3227
+ ClientFile.GetUrl = GetUrl;
3228
+ function GetUrlWithExt(api, file) {
3229
+ return api.GetBaseUrl() + "/file/" + file + (file.FileExt ? file.FileExt : "");
3230
+ }
3231
+ ClientFile.GetUrlWithExt = GetUrlWithExt;
3214
3232
  function Get(api, fileId) {
3215
3233
  return __awaiter(this, void 0, void 0, function () {
3216
3234
  var key, cacheData, req;
@@ -3418,16 +3436,16 @@ var ProgramKey;
3418
3436
  ProgramKey.Update = Update;
3419
3437
  })(ProgramKey || (ProgramKey = {}));
3420
3438
 
3421
- var MenuItemZoomControl;
3422
- (function (MenuItemZoomControl) {
3439
+ var ZoomControl;
3440
+ (function (ZoomControl) {
3423
3441
  var EDisplayType;
3424
3442
  (function (EDisplayType) {
3425
3443
  EDisplayType["Hidden"] = "hidden";
3426
3444
  EDisplayType["Point"] = "point";
3427
3445
  EDisplayType["Geometry"] = "geometry";
3428
3446
  EDisplayType["Model3D"] = "3d";
3429
- })(EDisplayType = MenuItemZoomControl.EDisplayType || (MenuItemZoomControl.EDisplayType = {}));
3430
- })(MenuItemZoomControl || (MenuItemZoomControl = {}));
3447
+ })(EDisplayType = ZoomControl.EDisplayType || (ZoomControl.EDisplayType = {}));
3448
+ })(ZoomControl || (ZoomControl = {}));
3431
3449
 
3432
3450
  var Tileset;
3433
3451
  (function (Tileset) {
@@ -3792,7 +3810,7 @@ var MenuItem;
3792
3810
  },
3793
3811
  CameraZoomSettings: [
3794
3812
  {
3795
- DisplayType: MenuItemZoomControl.EDisplayType.Model3D,
3813
+ DisplayType: ZoomControl.EDisplayType.Model3D,
3796
3814
  MaxZoom: 8000,
3797
3815
  MinZoom: 0,
3798
3816
  StyleID: styleId
@@ -3811,7 +3829,7 @@ var MenuItem;
3811
3829
  },
3812
3830
  CameraZoomSettings: [
3813
3831
  {
3814
- DisplayType: MenuItemZoomControl.EDisplayType.Model3D,
3832
+ DisplayType: ZoomControl.EDisplayType.Model3D,
3815
3833
  MaxZoom: 8000,
3816
3834
  MinZoom: 0,
3817
3835
  StyleID: styleId
@@ -4161,6 +4179,12 @@ var Style;
4161
4179
  EType["Entity"] = "ENTITY";
4162
4180
  EType["EntityRelationship"] = "ENTITY_RELATIONSHIP";
4163
4181
  })(EType = Style.EType || (Style.EType = {}));
4182
+ var EPointType;
4183
+ (function (EPointType) {
4184
+ EPointType["Point"] = "POINT";
4185
+ EPointType["Icon"] = "ICON";
4186
+ EPointType["Cylinder"] = "CYLINDER";
4187
+ })(EPointType = Style.EPointType || (Style.EPointType = {}));
4164
4188
  function GetList(api) {
4165
4189
  var _this = this;
4166
4190
  var cacheData = api.Cache.Get(GetListCacheKey());
@@ -4817,5 +4841,5 @@ var MathUtils;
4817
4841
  MathUtils.RandInt = RandInt;
4818
4842
  })(MathUtils || (MathUtils = {}));
4819
4843
 
4820
- export { AnnDocument, AbstractApi, Api, BruceApi, CamApi, IdmApi, Calculator, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, ClientFile, ProgramKey, MenuItemZoomControl, MenuItem, ProjectViewBookmark, ProjectView, PendingAction, Style, TilesetEntitiesMapTiles, TilesetExtMapTiles, Tileset, Ucs, Permission, Session, UserGroup, User, EncryptUtils, MathUtils, ObjectUtils, PathUtils };
4844
+ export { AnnDocument, AbstractApi, Api, BruceApi, CamApi, IdmApi, Calculator, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, PendingAction, Style, TilesetEntitiesMapTiles, TilesetExtMapTiles, Tileset, Ucs, Permission, Session, UserGroup, User, EncryptUtils, MathUtils, ObjectUtils, PathUtils };
4821
4845
  //# sourceMappingURL=bruce-models.es5.js.map