bruce-models 1.0.4 → 1.0.6
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 +26 -41
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +26 -41
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/entity/entity.js +10 -13
- package/dist/lib/entity/entity.js.map +1 -1
- package/dist/lib/entity/getters/entity-filter-getter.js +13 -3
- package/dist/lib/entity/getters/entity-filter-getter.js.map +1 -1
- package/dist/lib/entity/getters/entity-globe.js +3 -0
- package/dist/lib/entity/getters/entity-globe.js.map +1 -1
- package/dist/types/entity/getters/entity-filter-getter.d.ts +6 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -1617,19 +1617,16 @@
|
|
|
1617
1617
|
]
|
|
1618
1618
|
};
|
|
1619
1619
|
}
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
(!filter.orderBy ? "" : "&OrderBy=" + filter.orderBy) +
|
|
1631
|
-
(filter.sortOrder ? `&SortOrder=${filter.sortOrder == exports.Api.ESortOrder.Asc ? "ASC" : "DESC"}` : "");
|
|
1632
|
-
const data = yield api.GET(url, exports.Api.PrepReqParams(reqParams));
|
|
1620
|
+
const body = {
|
|
1621
|
+
SortOrder: filter.sortOrder == exports.Api.ESortOrder.Asc ? "ASC" : "DESC",
|
|
1622
|
+
OrderBy: filter.orderBy,
|
|
1623
|
+
Filter: requestFilter,
|
|
1624
|
+
LODType: filter.lodCategoryId,
|
|
1625
|
+
BruceEntityType: filter.entityTypeId,
|
|
1626
|
+
PageIndex: filter.pageIndex,
|
|
1627
|
+
PageSize: filter.pageSize
|
|
1628
|
+
};
|
|
1629
|
+
const data = yield api.POST("entities", body, exports.Api.PrepReqParams(reqParams));
|
|
1633
1630
|
const entities = data.Items;
|
|
1634
1631
|
for (let i = 0; i < entities.length; i++) {
|
|
1635
1632
|
const entity = entities[i];
|
|
@@ -3228,6 +3225,7 @@
|
|
|
3228
3225
|
const lon2 = lon1 + cellDegreeSize;
|
|
3229
3226
|
const lat2 = lat1 + cellDegreeSize;
|
|
3230
3227
|
const [id, cell] = getOrCreateCell(this.cells, cellDegreeSize, lon1, lon2, lat1, lat2);
|
|
3228
|
+
/*
|
|
3231
3229
|
{
|
|
3232
3230
|
const cell_bounds = { south: lat1, west: lon1, north: lat2, east: lon2 };
|
|
3233
3231
|
const subcells = [];
|
|
@@ -3254,11 +3252,13 @@
|
|
|
3254
3252
|
cell.Fetched = true;
|
|
3255
3253
|
return;
|
|
3256
3254
|
}
|
|
3255
|
+
|
|
3257
3256
|
let [x2, y2] = max;
|
|
3258
3257
|
x2 = Math.max(x2, lon2);
|
|
3259
3258
|
y2 = Math.max(y2, lat2);
|
|
3260
3259
|
max = [x2, y2];
|
|
3261
3260
|
}
|
|
3261
|
+
*/
|
|
3262
3262
|
ids.push(id);
|
|
3263
3263
|
cells.push(cell);
|
|
3264
3264
|
cells[id] = cell;
|
|
@@ -3294,31 +3294,6 @@
|
|
|
3294
3294
|
const { west: wr, south: sr, north: nr, east: er } = r;
|
|
3295
3295
|
return !(e <= wr || w >= er || n <= sr || s >= nr);
|
|
3296
3296
|
}
|
|
3297
|
-
function contains(l, r) {
|
|
3298
|
-
const { west: w, south: s, north: n, east: e } = l;
|
|
3299
|
-
const { west: wr, south: sr, north: nr, east: er } = r;
|
|
3300
|
-
return !(er < e || wr > w || nr > n || sr < s);
|
|
3301
|
-
}
|
|
3302
|
-
function crop(rect, by) {
|
|
3303
|
-
let { west: w, south: s, north: n, east: e } = rect;
|
|
3304
|
-
const { west: wc, south: sc, north: nc, east: ec } = by;
|
|
3305
|
-
w = Math.max(w, ec);
|
|
3306
|
-
e = Math.min(e, wc);
|
|
3307
|
-
s = Math.max(s, nc);
|
|
3308
|
-
n = Math.min(n, sc);
|
|
3309
|
-
return { west: w, south: s, north: n, east: e };
|
|
3310
|
-
}
|
|
3311
|
-
function intersection(l, r) {
|
|
3312
|
-
const { west: w, south: s, north: n, east: e } = l;
|
|
3313
|
-
const { west: wr, south: sr, north: nr, east: er } = r;
|
|
3314
|
-
const x = Math.min(e, er) - Math.max(w, wr);
|
|
3315
|
-
const y = Math.min(n, nr) - Math.max(s, sr);
|
|
3316
|
-
return (x > 0 && y > 0) ? x * y : 0;
|
|
3317
|
-
}
|
|
3318
|
-
function area(rect) {
|
|
3319
|
-
let { west: w, south: s, north: n, east: e } = rect;
|
|
3320
|
-
return Math.abs((e - w) * (n - s));
|
|
3321
|
-
}
|
|
3322
3297
|
function floorValueToCellSize(size, value) {
|
|
3323
3298
|
return Math.floor(value / size) * size;
|
|
3324
3299
|
}
|
|
@@ -3443,6 +3418,14 @@
|
|
|
3443
3418
|
}
|
|
3444
3419
|
return this.onScanUpdate;
|
|
3445
3420
|
}
|
|
3421
|
+
/**
|
|
3422
|
+
* Returns id that represents the combined menu item parameters.
|
|
3423
|
+
* If integrity changes while a request is running, the request will not emit a response.
|
|
3424
|
+
* @returns
|
|
3425
|
+
*/
|
|
3426
|
+
getIntegrityId() {
|
|
3427
|
+
return this.tagIds == null ? "" : this.tagIds.join();
|
|
3428
|
+
}
|
|
3446
3429
|
viewAreaSub() {
|
|
3447
3430
|
this.viewAreaDispose();
|
|
3448
3431
|
this.viewPortChangeRemoval = this.viewPort.Updated().Subscribe(() => {
|
|
@@ -3529,6 +3512,7 @@
|
|
|
3529
3512
|
// Increase id so that existing loops stop.
|
|
3530
3513
|
this.getterLoopId += 1;
|
|
3531
3514
|
const loopId = this.getterLoopId;
|
|
3515
|
+
const loopIntegrity = this.getIntegrityId();
|
|
3532
3516
|
new Promise(() => __awaiter(this, void 0, void 0, function* () {
|
|
3533
3517
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3534
3518
|
// Minor delay to stop 50 menu items enabling doing their first request all together.
|
|
@@ -3587,12 +3571,13 @@
|
|
|
3587
3571
|
sortOrder: exports.Api.ESortOrder.Asc,
|
|
3588
3572
|
entityTypeConditions: this.attrFilter
|
|
3589
3573
|
});
|
|
3574
|
+
const integrity = this.getIntegrityId();
|
|
3575
|
+
if (loopIntegrity == integrity && page) {
|
|
3576
|
+
(_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger(page);
|
|
3577
|
+
}
|
|
3590
3578
|
if (this.getterLoopId != loopId) {
|
|
3591
3579
|
break;
|
|
3592
3580
|
}
|
|
3593
|
-
if (page) {
|
|
3594
|
-
(_c = this.onUpdate) === null || _c === void 0 ? void 0 : _c.Trigger(page);
|
|
3595
|
-
}
|
|
3596
3581
|
if (!postedLoading) {
|
|
3597
3582
|
this.postStatus({ msg: EStatus.Loading, revoking: false });
|
|
3598
3583
|
postedLoading = true;
|