bruce-cesium 6.9.1 → 6.9.2
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-cesium.es5.js +41 -15
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +39 -13
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +1 -1
- package/dist/lib/widgets/widget-bookmarks.js +7 -3
- package/dist/lib/widgets/widget-bookmarks.js.map +1 -1
- package/dist/lib/widgets/widget-cursorbar.js +5 -0
- package/dist/lib/widgets/widget-cursorbar.js.map +1 -1
- package/dist/lib/widgets/widget-left-panel.js +19 -7
- package/dist/lib/widgets/widget-left-panel.js.map +1 -1
- package/dist/lib/widgets/widget-view-bar.js +4 -1
- package/dist/lib/widgets/widget-view-bar.js.map +1 -1
- package/dist/lib/widgets/widget.js +3 -1
- package/dist/lib/widgets/widget.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +1 -1
- package/package.json +2 -1
package/dist/bruce-cesium.umd.js
CHANGED
|
@@ -2597,7 +2597,9 @@
|
|
|
2597
2597
|
constructor(params) {
|
|
2598
2598
|
this.widgetId = BModels.ObjectUtils.UId();
|
|
2599
2599
|
let { viewer, container, manager } = params;
|
|
2600
|
-
|
|
2600
|
+
// A host app can pass an undefined viewer (eg. mid-teardown); fall back to
|
|
2601
|
+
// no container rather than crashing on viewer.container.
|
|
2602
|
+
if (!container && viewer) {
|
|
2601
2603
|
container = viewer.container;
|
|
2602
2604
|
}
|
|
2603
2605
|
this._viewer = viewer;
|
|
@@ -3153,7 +3155,10 @@
|
|
|
3153
3155
|
this.customControls = new Map();
|
|
3154
3156
|
this._generateStyles();
|
|
3155
3157
|
this._generateElement();
|
|
3156
|
-
this
|
|
3158
|
+
// Guard against a host app constructing this widget with no live viewer.
|
|
3159
|
+
if (this._viewer) {
|
|
3160
|
+
this._viewer[VIEWER_VIEW_BAR_WIDGET_KEY] = this;
|
|
3161
|
+
}
|
|
3157
3162
|
}
|
|
3158
3163
|
Dispose() {
|
|
3159
3164
|
super.Dispose();
|
|
@@ -23350,7 +23355,10 @@
|
|
|
23350
23355
|
this._viewId = params.viewId;
|
|
23351
23356
|
this._generateStyles();
|
|
23352
23357
|
this._generateElement();
|
|
23353
|
-
this
|
|
23358
|
+
// Guard against a host app constructing this widget with no live viewer.
|
|
23359
|
+
if (this._viewer) {
|
|
23360
|
+
this._viewer[VIEWER_LEFT_PANEL_WIDGET_KEY] = this;
|
|
23361
|
+
}
|
|
23354
23362
|
this._loading = this.loadBookmarks();
|
|
23355
23363
|
this._loading.then(() => {
|
|
23356
23364
|
if (params.runFirstBookmark && this.bookmarks.length) {
|
|
@@ -23792,10 +23800,18 @@
|
|
|
23792
23800
|
return;
|
|
23793
23801
|
}
|
|
23794
23802
|
const clazz = this.customTabs.get(this._enabledPanelTab);
|
|
23795
|
-
|
|
23796
|
-
|
|
23797
|
-
|
|
23798
|
-
|
|
23803
|
+
try {
|
|
23804
|
+
tabContent = new clazz({
|
|
23805
|
+
widget: this,
|
|
23806
|
+
container: container
|
|
23807
|
+
});
|
|
23808
|
+
}
|
|
23809
|
+
catch (e) {
|
|
23810
|
+
// Partner-supplied tab content class; a throwing constructor shouldn't take
|
|
23811
|
+
// down the whole panel.
|
|
23812
|
+
console.error(e);
|
|
23813
|
+
return;
|
|
23814
|
+
}
|
|
23799
23815
|
break;
|
|
23800
23816
|
}
|
|
23801
23817
|
this._enabledTabContent = tabContent;
|
|
@@ -23817,17 +23833,18 @@
|
|
|
23817
23833
|
document.documentElement.style.setProperty(VIEWER_LEFT_PANEL_CSS_VAR_LEFT, "0px");
|
|
23818
23834
|
}
|
|
23819
23835
|
SelectBookmark(bookmark) {
|
|
23836
|
+
var _a;
|
|
23820
23837
|
const isFirstEnabled = !this._lastEnabledBookmarkId;
|
|
23821
23838
|
this._lastEnabledBookmarkId = bookmark.ID;
|
|
23822
23839
|
exports.ViewRenderEngine.Render({
|
|
23823
|
-
apiGetter: this._apiGetters.GetBruceGetter(),
|
|
23840
|
+
apiGetter: (_a = this._apiGetters) === null || _a === void 0 ? void 0 : _a.GetBruceGetter(),
|
|
23824
23841
|
bookmark: bookmark,
|
|
23825
23842
|
bookmarkId: bookmark.ID,
|
|
23826
23843
|
manager: this._manager,
|
|
23827
23844
|
skipTransition: isFirstEnabled,
|
|
23828
23845
|
viewer: this._viewer,
|
|
23829
23846
|
viewId: this._viewId
|
|
23830
|
-
});
|
|
23847
|
+
}).catch((e) => console.error(e));
|
|
23831
23848
|
if (this._onBookmarkSelect) {
|
|
23832
23849
|
this._onBookmarkSelect.Trigger(bookmark);
|
|
23833
23850
|
}
|
|
@@ -26523,7 +26540,10 @@
|
|
|
26523
26540
|
}
|
|
26524
26541
|
this._updateBookmarks();
|
|
26525
26542
|
});
|
|
26526
|
-
this
|
|
26543
|
+
// Guard against a host app constructing this widget with no live viewer.
|
|
26544
|
+
if (this._viewer) {
|
|
26545
|
+
this._viewer[VIEWER_BOOKMARKS_WIDGET_KEY] = this;
|
|
26546
|
+
}
|
|
26527
26547
|
}
|
|
26528
26548
|
LoadViewId(params) {
|
|
26529
26549
|
let { viewId, runFirstBookmark, autoPlay, bookmarkId } = params;
|
|
@@ -26901,9 +26921,10 @@
|
|
|
26901
26921
|
`;
|
|
26902
26922
|
}
|
|
26903
26923
|
_updateBookmarks() {
|
|
26924
|
+
var _a;
|
|
26904
26925
|
const bookmarks = this.bookmarks;
|
|
26905
26926
|
this._element.style.display = bookmarks.length ? "flex" : "none";
|
|
26906
|
-
const api = this._apiGetters.GetBruceApi();
|
|
26927
|
+
const api = (_a = this._apiGetters) === null || _a === void 0 ? void 0 : _a.GetBruceApi();
|
|
26907
26928
|
const row = this._row;
|
|
26908
26929
|
row.innerHTML = "";
|
|
26909
26930
|
for (const bookmark of bookmarks) {
|
|
@@ -26945,7 +26966,7 @@
|
|
|
26945
26966
|
skipTransition: isFirstEnabled,
|
|
26946
26967
|
viewId: this._viewId,
|
|
26947
26968
|
viewer: this._viewer
|
|
26948
|
-
});
|
|
26969
|
+
}).catch((e) => console.error(e));
|
|
26949
26970
|
}
|
|
26950
26971
|
_updateBookmark() {
|
|
26951
26972
|
const allBookmarks = this._row.querySelectorAll(".NextspaceBookmarksRowItem");
|
|
@@ -29026,7 +29047,12 @@
|
|
|
29026
29047
|
this._cesiumEventRemoval = null;
|
|
29027
29048
|
}
|
|
29028
29049
|
_listenSelection() {
|
|
29050
|
+
var _a, _b;
|
|
29029
29051
|
this._disposeCesiumEvent();
|
|
29052
|
+
// No live viewer/scene to attach cursor listeners to (eg. widget constructed without one).
|
|
29053
|
+
if (!((_b = (_a = this._viewer) === null || _a === void 0 ? void 0 : _a.scene) === null || _b === void 0 ? void 0 : _b.canvas)) {
|
|
29054
|
+
return;
|
|
29055
|
+
}
|
|
29030
29056
|
const events = new Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas);
|
|
29031
29057
|
const throttle = new CursorBarMouseEventThrottle(this._viewer);
|
|
29032
29058
|
let lastHoverPos = null;
|
|
@@ -38297,7 +38323,7 @@
|
|
|
38297
38323
|
StyleUtils.ApplyTypeStyle = ApplyTypeStyle;
|
|
38298
38324
|
})(exports.StyleUtils || (exports.StyleUtils = {}));
|
|
38299
38325
|
|
|
38300
|
-
const VERSION = "6.9.
|
|
38326
|
+
const VERSION = "6.9.2";
|
|
38301
38327
|
/**
|
|
38302
38328
|
* Updates the environment instance used by bruce-cesium to one specified.
|
|
38303
38329
|
* This can be used to ensure that the instance a parent is referencing is shared between bruce-cesium, bruce-models, and the parent app.
|