bruce-cesium 4.2.6 → 4.2.8
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 +6223 -5721
- package/dist/bruce-cesium.es5.js.map +1 -1
- package/dist/bruce-cesium.umd.js +6474 -5970
- package/dist/bruce-cesium.umd.js.map +1 -1
- package/dist/lib/bruce-cesium.js +13 -1
- package/dist/lib/bruce-cesium.js.map +1 -1
- package/dist/lib/rendering/tileset-render-engine.js +1 -1
- package/dist/lib/rendering/tileset-render-engine.js.map +1 -1
- package/dist/lib/viewer/viewer-utils.js +48 -14
- package/dist/lib/viewer/viewer-utils.js.map +1 -1
- package/dist/lib/widgets/left-panel-tabs/widget-left-panel-tab-bookmarks.js +141 -0
- package/dist/lib/widgets/left-panel-tabs/widget-left-panel-tab-bookmarks.js.map +1 -0
- package/dist/lib/widgets/left-panel-tabs/widget-left-panel-tab.js +42 -0
- package/dist/lib/widgets/left-panel-tabs/widget-left-panel-tab.js.map +1 -0
- package/dist/lib/widgets/widget-bookmarks.js +5 -2
- package/dist/lib/widgets/widget-bookmarks.js.map +1 -1
- package/dist/lib/widgets/widget-branding.js +8 -1
- package/dist/lib/widgets/widget-branding.js.map +1 -1
- package/dist/lib/widgets/widget-cursorbar.js +8 -1
- package/dist/lib/widgets/widget-cursorbar.js.map +1 -1
- package/dist/lib/widgets/widget-left-panel.js +323 -0
- package/dist/lib/widgets/widget-left-panel.js.map +1 -0
- package/dist/lib/widgets/widget.js +33 -0
- package/dist/lib/widgets/widget.js.map +1 -1
- package/dist/types/bruce-cesium.d.ts +13 -1
- package/dist/types/viewer/viewer-utils.d.ts +10 -0
- package/dist/types/widgets/left-panel-tabs/widget-left-panel-tab-bookmarks.d.ts +11 -0
- package/dist/types/widgets/left-panel-tabs/widget-left-panel-tab.d.ts +17 -0
- package/dist/types/widgets/widget-bookmarks.d.ts +1 -0
- package/dist/types/widgets/widget-left-panel.d.ts +62 -0
- package/dist/types/widgets/widget.d.ts +3 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import { Widget } from "../widgets/widget";
|
|
|
5
5
|
interface IWidget {
|
|
6
6
|
isDestroyed: () => boolean;
|
|
7
7
|
destroy: () => void;
|
|
8
|
+
container: Element;
|
|
8
9
|
}
|
|
9
10
|
export declare namespace ViewerUtils {
|
|
10
11
|
/**
|
|
@@ -16,9 +17,16 @@ export declare namespace ViewerUtils {
|
|
|
16
17
|
destroyWidgets?: boolean;
|
|
17
18
|
styleContainer?: boolean;
|
|
18
19
|
nextspaceWidgets?: boolean;
|
|
20
|
+
widgetParams?: any;
|
|
19
21
|
}): {
|
|
20
22
|
widgets: IDictionary<Widget.AWidget>;
|
|
21
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Destroys all widgets attached to the given viewer.
|
|
26
|
+
* All Nextspace widgets get auto-associated with the viewer they are created against.
|
|
27
|
+
* @param viewer
|
|
28
|
+
*/
|
|
29
|
+
function DisposeNextspaceWidgets(viewer: Cesium.Viewer): void;
|
|
22
30
|
function DestroyWidget(widget: IWidget): void;
|
|
23
31
|
/**
|
|
24
32
|
* Hides all unnecessary elements from the Cesium viewer container.
|
|
@@ -54,9 +62,11 @@ export declare namespace ViewerUtils {
|
|
|
54
62
|
cursorBar?: boolean;
|
|
55
63
|
searchBar?: boolean;
|
|
56
64
|
infoView?: boolean;
|
|
65
|
+
leftPanel?: boolean;
|
|
57
66
|
embeddedInfoView?: boolean;
|
|
58
67
|
bookmarks?: boolean;
|
|
59
68
|
viewId?: string;
|
|
69
|
+
runFirstBookmark?: boolean;
|
|
60
70
|
}): IDictionary<Widget.AWidget>;
|
|
61
71
|
/**
|
|
62
72
|
* Returns if the given token is valid or not.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WidgetLeftPanelTab } from "./widget-left-panel-tab";
|
|
2
|
+
export declare class WidgetLeftPanelTabBookmarks extends WidgetLeftPanelTab.ATab {
|
|
3
|
+
STYLESHEET_ID: string;
|
|
4
|
+
constructor(params: WidgetLeftPanelTab.IParams);
|
|
5
|
+
Dispose(): void;
|
|
6
|
+
private _generateStyles;
|
|
7
|
+
private _generateElement;
|
|
8
|
+
private _updateBookmarks;
|
|
9
|
+
private _selectBookmark;
|
|
10
|
+
private _updateBookmark;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { WidgetLeftPanel } from "../widget-left-panel";
|
|
2
|
+
export declare namespace WidgetLeftPanelTab {
|
|
3
|
+
interface IParams {
|
|
4
|
+
widget: WidgetLeftPanel;
|
|
5
|
+
container: HTMLElement;
|
|
6
|
+
}
|
|
7
|
+
abstract class ATab {
|
|
8
|
+
protected _widget: WidgetLeftPanel;
|
|
9
|
+
get WidgetLeftPanel(): WidgetLeftPanel;
|
|
10
|
+
protected _container: HTMLElement;
|
|
11
|
+
get Container(): HTMLElement;
|
|
12
|
+
protected _element: HTMLElement;
|
|
13
|
+
get Element(): HTMLElement;
|
|
14
|
+
constructor(params: IParams);
|
|
15
|
+
Dispose(): void;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Widget } from "./widget";
|
|
2
2
|
interface IParams extends Widget.IParams {
|
|
3
3
|
viewId: string;
|
|
4
|
+
runFirstBookmark?: boolean;
|
|
4
5
|
}
|
|
5
6
|
export declare const VIEWER_BOOKMARKS_WIDGET_KEY = "_viewerBookmarksWidget";
|
|
6
7
|
export declare class WidgetBookmarks extends Widget.AWidget {
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/// <reference types="cesium" />
|
|
2
|
+
import { ProjectViewBookmark } from "bruce-models";
|
|
3
|
+
import { Widget } from "./widget";
|
|
4
|
+
interface IParams extends Widget.IParams {
|
|
5
|
+
viewId: string;
|
|
6
|
+
runFirstBookmark?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const VIEWER_LEFT_PANEL_WIDGET_KEY = "_viewerLeftPanelWidget";
|
|
9
|
+
export declare const VIEWER_LEFT_PANEL_CSS_VAR_LEFT = "--nextspace-left-panel-width";
|
|
10
|
+
export declare class WidgetLeftPanel extends Widget.AWidget {
|
|
11
|
+
STYLESHEET_ID: string;
|
|
12
|
+
private _viewId;
|
|
13
|
+
get ViewId(): string;
|
|
14
|
+
set ViewId(value: string);
|
|
15
|
+
private _enabledPanelTab;
|
|
16
|
+
private _enabledTabContent;
|
|
17
|
+
private bookmarks;
|
|
18
|
+
get Bookmarks(): ProjectViewBookmark.IBookmark[];
|
|
19
|
+
private _lastEnabledBookmarkId;
|
|
20
|
+
get LastEnabledBookmarkId(): string;
|
|
21
|
+
set LastEnabledBookmarkId(value: string);
|
|
22
|
+
private _loading;
|
|
23
|
+
get Loading(): Promise<void>;
|
|
24
|
+
_getManager(): import("../bruce-cesium").MenuItemManager.Manager;
|
|
25
|
+
_getViewer(): import("cesium").Viewer;
|
|
26
|
+
_getApiGetters(): import("bruce-models").ApiGetters;
|
|
27
|
+
private customTabs;
|
|
28
|
+
constructor(params: IParams);
|
|
29
|
+
private loadBookmarks;
|
|
30
|
+
Dispose(): void;
|
|
31
|
+
private _generateStyles;
|
|
32
|
+
private _generateElement;
|
|
33
|
+
/**
|
|
34
|
+
* Adds a custom tab to the left panel.
|
|
35
|
+
* @param params
|
|
36
|
+
*/
|
|
37
|
+
AddPanelTab(params: {
|
|
38
|
+
tab: string;
|
|
39
|
+
title: string;
|
|
40
|
+
svgStr: string;
|
|
41
|
+
content: any;
|
|
42
|
+
}): void;
|
|
43
|
+
private _addPanelTab;
|
|
44
|
+
private _addPlaceholderTab;
|
|
45
|
+
/**
|
|
46
|
+
* Updates the panel styles based on the current state.
|
|
47
|
+
* Eg: if a tab is enabled, the button should be highlighted.
|
|
48
|
+
*/
|
|
49
|
+
private _updatePanelStyles;
|
|
50
|
+
/**
|
|
51
|
+
* Opens or closes a panel based on the current state.
|
|
52
|
+
*/
|
|
53
|
+
private _updatePanelContent;
|
|
54
|
+
/**
|
|
55
|
+
* Update CSS variables so other widgets can be offset correctly.
|
|
56
|
+
* Eg: the cursor-bar will be pushed by the left panel as they're both on the left side.
|
|
57
|
+
*/
|
|
58
|
+
private updateCssVars;
|
|
59
|
+
private resetCssVars;
|
|
60
|
+
SelectBookmark(bookmark: ProjectViewBookmark.IBookmark): void;
|
|
61
|
+
}
|
|
62
|
+
export {};
|
|
@@ -12,6 +12,8 @@ export declare namespace Widget {
|
|
|
12
12
|
apiGetters?: BModels.ApiGetters;
|
|
13
13
|
}
|
|
14
14
|
abstract class AWidget {
|
|
15
|
+
private widgetId;
|
|
16
|
+
get WidgetId(): string;
|
|
15
17
|
protected _viewer: Cesium.Viewer;
|
|
16
18
|
get Viewer(): Cesium.Viewer;
|
|
17
19
|
protected _container: HTMLElement;
|
|
@@ -23,4 +25,5 @@ export declare namespace Widget {
|
|
|
23
25
|
constructor(params: IParams);
|
|
24
26
|
Dispose(): void;
|
|
25
27
|
}
|
|
28
|
+
function GetWidgets(viewer: Cesium.Viewer): Widget.AWidget[];
|
|
26
29
|
}
|