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.
@@ -233,12 +233,16 @@
233
233
  var CacheControl = /** @class */ (function () {
234
234
  function CacheControl() {
235
235
  this.data = {};
236
+ this.Disabled = false;
236
237
  }
237
238
  CacheControl.prototype.Set = function (id, data, duration) {
238
239
  if (duration === void 0) { duration = -1; }
239
240
  this.data[id + ""] = new CacheItem(id + "", data, duration);
240
241
  };
241
242
  CacheControl.prototype.Get = function (id) {
243
+ if (this.Disabled) {
244
+ return null;
245
+ }
242
246
  var item = this.data[id + ""];
243
247
  if (item == null) {
244
248
  return null;
@@ -270,9 +274,15 @@
270
274
  }
271
275
  };
272
276
  CacheControl.prototype.GetKeys = function () {
277
+ if (this.Disabled) {
278
+ return [];
279
+ }
273
280
  return Object.keys(this.data);
274
281
  };
275
282
  CacheControl.prototype.GetValues = function () {
283
+ if (this.Disabled) {
284
+ return [];
285
+ }
276
286
  var values = [];
277
287
  for (var key in this.data) {
278
288
  var data = this.Get(key);
@@ -3191,6 +3201,14 @@
3191
3201
  return "" + exports.Api.ECacheKey.ClientFile + exports.Api.ECacheKey.Id + fileId;
3192
3202
  }
3193
3203
  ClientFile.GetCacheKey = GetCacheKey;
3204
+ function GetUrl(api, fileId) {
3205
+ return api.GetBaseUrl() + "/file/" + fileId;
3206
+ }
3207
+ ClientFile.GetUrl = GetUrl;
3208
+ function GetUrlWithExt(api, file) {
3209
+ return api.GetBaseUrl() + "/file/" + file + (file.FileExt ? file.FileExt : "");
3210
+ }
3211
+ ClientFile.GetUrlWithExt = GetUrlWithExt;
3194
3212
  function Get(api, fileId) {
3195
3213
  return __awaiter(this, void 0, void 0, function () {
3196
3214
  var key, cacheData, req;
@@ -3397,15 +3415,15 @@
3397
3415
  ProgramKey.Update = Update;
3398
3416
  })(exports.ProgramKey || (exports.ProgramKey = {}));
3399
3417
 
3400
- (function (MenuItemZoomControl) {
3418
+ (function (ZoomControl) {
3401
3419
  var EDisplayType;
3402
3420
  (function (EDisplayType) {
3403
3421
  EDisplayType["Hidden"] = "hidden";
3404
3422
  EDisplayType["Point"] = "point";
3405
3423
  EDisplayType["Geometry"] = "geometry";
3406
3424
  EDisplayType["Model3D"] = "3d";
3407
- })(EDisplayType = MenuItemZoomControl.EDisplayType || (MenuItemZoomControl.EDisplayType = {}));
3408
- })(exports.MenuItemZoomControl || (exports.MenuItemZoomControl = {}));
3425
+ })(EDisplayType = ZoomControl.EDisplayType || (ZoomControl.EDisplayType = {}));
3426
+ })(exports.ZoomControl || (exports.ZoomControl = {}));
3409
3427
 
3410
3428
  (function (Tileset) {
3411
3429
  function GetCacheKey(tilesetId, loadFiles) {
@@ -3768,7 +3786,7 @@
3768
3786
  },
3769
3787
  CameraZoomSettings: [
3770
3788
  {
3771
- DisplayType: exports.MenuItemZoomControl.EDisplayType.Model3D,
3789
+ DisplayType: exports.ZoomControl.EDisplayType.Model3D,
3772
3790
  MaxZoom: 8000,
3773
3791
  MinZoom: 0,
3774
3792
  StyleID: styleId
@@ -3787,7 +3805,7 @@
3787
3805
  },
3788
3806
  CameraZoomSettings: [
3789
3807
  {
3790
- DisplayType: exports.MenuItemZoomControl.EDisplayType.Model3D,
3808
+ DisplayType: exports.ZoomControl.EDisplayType.Model3D,
3791
3809
  MaxZoom: 8000,
3792
3810
  MinZoom: 0,
3793
3811
  StyleID: styleId
@@ -4133,6 +4151,12 @@
4133
4151
  EType["Entity"] = "ENTITY";
4134
4152
  EType["EntityRelationship"] = "ENTITY_RELATIONSHIP";
4135
4153
  })(EType = Style.EType || (Style.EType = {}));
4154
+ var EPointType;
4155
+ (function (EPointType) {
4156
+ EPointType["Point"] = "POINT";
4157
+ EPointType["Icon"] = "ICON";
4158
+ EPointType["Cylinder"] = "CYLINDER";
4159
+ })(EPointType = Style.EPointType || (Style.EPointType = {}));
4136
4160
  function GetList(api) {
4137
4161
  var _this = this;
4138
4162
  var cacheData = api.Cache.Get(GetListCacheKey());