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.
- package/dist/bruce-models.es5.js +31 -7
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +29 -5
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/common/cache.js +10 -0
- package/dist/lib/common/cache.js.map +1 -1
- package/dist/lib/common/geometry.js.map +1 -1
- package/dist/lib/file/client-file.js +8 -0
- package/dist/lib/file/client-file.js.map +1 -1
- package/dist/lib/project/menu-item.js +3 -3
- package/dist/lib/project/menu-item.js.map +1 -1
- package/dist/lib/project/zoom-control.js +14 -0
- package/dist/lib/project/zoom-control.js.map +1 -0
- package/dist/lib/style/style.js +6 -0
- package/dist/lib/style/style.js.map +1 -1
- package/dist/lib/util/url-utils.js +15 -15
- package/dist/lib/util/url-utils.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/common/cache.d.ts +1 -0
- package/dist/types/common/geometry.d.ts +1 -0
- package/dist/types/file/client-file.d.ts +2 -0
- package/dist/types/project/menu-item.d.ts +3 -3
- package/dist/types/project/{menu-item-zoom-control.d.ts → zoom-control.d.ts} +1 -1
- package/dist/types/style/style.d.ts +55 -9
- package/dist/types/util/url-utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/lib/project/menu-item-zoom-control.js +0 -14
- package/dist/lib/project/menu-item-zoom-control.js.map +0 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -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 (
|
|
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 =
|
|
3408
|
-
})(exports.
|
|
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.
|
|
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.
|
|
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());
|