@itwin/appui-react 3.6.0-dev.3 → 3.6.0-dev.33
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/CHANGELOG.md +26 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts +6 -3
- package/lib/cjs/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
- package/lib/cjs/appui-react/content/FloatingViewportContent.js +11 -8
- package/lib/cjs/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts +0 -2
- package/lib/cjs/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js +14 -15
- package/lib/cjs/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts +3 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/cjs/appui-react/widget-panels/Frontstage.js +3 -5
- package/lib/cjs/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts +6 -3
- package/lib/esm/appui-react/content/FloatingViewportContent.d.ts.map +1 -1
- package/lib/esm/appui-react/content/FloatingViewportContent.js +11 -8
- package/lib/esm/appui-react/content/FloatingViewportContent.js.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts +0 -2
- package/lib/esm/appui-react/frontstage/FrontstageDef.d.ts.map +1 -1
- package/lib/esm/appui-react/frontstage/FrontstageDef.js +15 -16
- package/lib/esm/appui-react/frontstage/FrontstageDef.js.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts +3 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.d.ts.map +1 -1
- package/lib/esm/appui-react/widget-panels/Frontstage.js +2 -5
- package/lib/esm/appui-react/widget-panels/Frontstage.js.map +1 -1
- package/package.json +32 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
# Change Log - @itwin/appui-react
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 15 Dec 2022 16:38:28 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 3.5.1
|
|
6
|
+
Thu, 15 Dec 2022 16:38:28 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 3.5.0
|
|
11
|
+
Wed, 07 Dec 2022 19:12:36 GMT
|
|
12
|
+
|
|
13
|
+
### Updates
|
|
14
|
+
|
|
15
|
+
- Add FeatureOverridesChanged SyncUIEvent in SyncUiEventDispatcher.ts
|
|
16
|
+
- Do not auto-hide the UI when floating widget is hovered.
|
|
17
|
+
- Fix a circular dependency issue.
|
|
18
|
+
- Updated pin icon for help widget.
|
|
19
|
+
- Deprecate pseudo components of frontstage provider in favor of configuration interfaces.
|
|
20
|
+
- Add automatic horizonal scrolling to the ListPicker's expandable blocks for small form factors or long strings.
|
|
21
|
+
- Refactored many tests to remove enzyme and snaphot testing
|
|
22
|
+
- Unpin classnames package
|
|
23
|
+
- Rename RestoreFrontstagesLayoutTool to RestoreAllFrontstagesTool.
|
|
24
|
+
- Add RestoreFrontstagesLayout tool.
|
|
25
|
+
- Deprecate components in preparation for next major version.
|
|
26
|
+
- Persist the toolbar-opacity to state.
|
|
27
|
+
- Add a toolbar opacity to the state and the UiFramework API to allow users or apps to configure it. Add a slider to the UiSettingsPage to control the toolbar opacity.
|
|
28
|
+
- Update WidgetDef to pass the optional prop allowedPanelTargets to createTab wh
|
|
4
29
|
|
|
5
30
|
## 3.4.7
|
|
6
31
|
Wed, 30 Nov 2022 14:28:19 GMT
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import "./FloatingViewportContent.css";
|
|
5
5
|
import * as React from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { ScreenViewport } from "@itwin/core-frontend";
|
|
7
|
+
import { ViewStateProp } from "@itwin/imodel-components-react";
|
|
7
8
|
/**
|
|
8
9
|
* @beta
|
|
9
10
|
*/
|
|
@@ -12,8 +13,10 @@ export interface FloatingViewportContentProps {
|
|
|
12
13
|
onContextMenu?: (e: React.MouseEvent) => boolean;
|
|
13
14
|
/** viewport/content control uniqueId */
|
|
14
15
|
contentId: string;
|
|
15
|
-
/** The initial view state used to create the viewport */
|
|
16
|
-
initialViewState:
|
|
16
|
+
/** The initial view state used to create the viewport, or a function that returns it (will refresh when the function changes) */
|
|
17
|
+
initialViewState: ViewStateProp;
|
|
18
|
+
/** Function to get a reference to the ScreenViewport */
|
|
19
|
+
viewportRef?: React.Ref<ScreenViewport>;
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* FloatingViewportContent component that creates its own [FloatingViewportContentControl].
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingViewportContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,+BAA+B,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"FloatingViewportContent.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,+BAA+B,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAa,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEjE,OAAO,EAAqB,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAUlF;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,OAAO,CAAC;IACjD,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,iIAAiI;IACjI,gBAAgB,EAAE,aAAa,CAAC;IAChC,wDAAwD;IACxD,WAAW,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACzC;AAED;;;;;GAKG;AAEH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,eA2D1E"}
|
|
@@ -17,6 +17,7 @@ const ViewportContentControl_1 = require("./ViewportContentControl");
|
|
|
17
17
|
const ContentViewManager_1 = require("./ContentViewManager");
|
|
18
18
|
const UiShowHideManager_1 = require("../utils/UiShowHideManager");
|
|
19
19
|
const ContentLayout_1 = require("./ContentLayout");
|
|
20
|
+
const core_react_1 = require("@itwin/core-react");
|
|
20
21
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
21
22
|
const FloatingViewport = (0, presentation_components_1.viewWithUnifiedSelection)(imodel_components_react_1.ViewportComponent);
|
|
22
23
|
/**
|
|
@@ -27,10 +28,14 @@ const FloatingViewport = (0, presentation_components_1.viewWithUnifiedSelection)
|
|
|
27
28
|
*/
|
|
28
29
|
// istanbul ignore next
|
|
29
30
|
function FloatingViewportContent(props) {
|
|
30
|
-
const { contentId, initialViewState } = props;
|
|
31
|
+
const { contentId, initialViewState, viewportRef } = props;
|
|
31
32
|
const [viewport, setViewport] = React.useState();
|
|
32
33
|
const contentControl = React.useRef();
|
|
33
|
-
const
|
|
34
|
+
const viewState = React.useMemo(() => typeof initialViewState === "function" ? initialViewState() : initialViewState, [initialViewState]);
|
|
35
|
+
const ref = React.useCallback((v) => {
|
|
36
|
+
setViewport(v);
|
|
37
|
+
}, []);
|
|
38
|
+
const onViewportRef = (0, core_react_1.useRefs)(ref, ...(viewportRef ? [viewportRef] : []));
|
|
34
39
|
React.useEffect(() => {
|
|
35
40
|
if (!contentControl.current) {
|
|
36
41
|
contentControl.current = new ViewportContentControl_1.FloatingViewportContentControl(contentId, contentId, null);
|
|
@@ -43,19 +48,17 @@ function FloatingViewportContent(props) {
|
|
|
43
48
|
}
|
|
44
49
|
};
|
|
45
50
|
}, [contentId]);
|
|
46
|
-
const viewPortControl = React.useMemo(() =>
|
|
51
|
+
const viewPortControl = React.useMemo(() => React.createElement(FloatingViewport, { viewportRef: onViewportRef, imodel: viewState.iModel, viewState: viewState, onContextMenu: props.onContextMenu, controlId: contentId }), [onViewportRef, props.onContextMenu, viewState, contentId]);
|
|
47
52
|
React.useEffect(() => {
|
|
48
53
|
if (viewport && contentControl.current) {
|
|
49
54
|
contentControl.current.viewport = viewport;
|
|
50
55
|
if (null === contentControl.current.reactNode) {
|
|
51
56
|
contentControl.current.reactNode = viewPortControl;
|
|
52
57
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
contentControl.current.processViewSelectorChange(initialViewState.iModel, initialViewState.id, initialViewState, initialViewState.name);
|
|
56
|
-
}
|
|
58
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
59
|
+
contentControl.current.processViewSelectorChange(viewState.iModel, viewState.id, viewState, viewState.name);
|
|
57
60
|
}
|
|
58
|
-
}, [
|
|
61
|
+
}, [viewState, viewPortControl, viewport]);
|
|
59
62
|
React.useEffect(() => {
|
|
60
63
|
const onViewClose = (vp) => {
|
|
61
64
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingViewportContent.js","sourceRoot":"","sources":["../../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yCAAuC;AACvC,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"FloatingViewportContent.js","sourceRoot":"","sources":["../../../../src/appui-react/content/FloatingViewportContent.tsx"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yCAAuC;AACvC,+BAA+B;AAC/B,wDAAiE;AACjE,4EAA0E;AAC1E,4EAAkF;AAClF,qEAA0E;AAC1E,6DAA0D;AAC1D,kEAA+D;AAC/D,mDAAiD;AACjD,kDAA4C;AAE5C,gEAAgE;AAChE,MAAM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CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACpE,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,6BAAK,WAAW,EAAE,qCAAiB,CAAC,sBAAsB,EAAE,SAAS,EAAC,4BAA4B,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE;QAChJ,oBAAC,8BAAc,IAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAI,CACzF,CACP,CAAC;AACJ,CAAC;AA3DD,0DA2DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\nimport \"./FloatingViewportContent.css\";\r\nimport * as React from \"react\";\r\nimport { IModelApp, ScreenViewport } from \"@itwin/core-frontend\";\r\nimport { viewWithUnifiedSelection } from \"@itwin/presentation-components\";\r\nimport { ViewportComponent, ViewStateProp } from \"@itwin/imodel-components-react\";\r\nimport { FloatingViewportContentControl } from \"./ViewportContentControl\";\r\nimport { ContentViewManager } from \"./ContentViewManager\";\r\nimport { UiShowHideManager } from \"../utils/UiShowHideManager\";\r\nimport { ContentWrapper } from \"./ContentLayout\";\r\nimport { useRefs } from \"@itwin/core-react\";\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nconst FloatingViewport = viewWithUnifiedSelection(ViewportComponent);\r\n\r\n/**\r\n * @beta\r\n */\r\nexport interface FloatingViewportContentProps {\r\n /** callback used to construct context menu when user right-clicks on canvas/viewport */\r\n onContextMenu?: (e: React.MouseEvent) => boolean;\r\n /** viewport/content control uniqueId */\r\n contentId: string;\r\n /** The initial view state used to create the viewport, or a function that returns it (will refresh when the function changes) */\r\n initialViewState: ViewStateProp;\r\n /** Function to get a reference to the ScreenViewport */\r\n viewportRef?: React.Ref<ScreenViewport>;\r\n}\r\n\r\n/**\r\n * FloatingViewportContent component that creates its own [FloatingViewportContentControl].\r\n * This allows it to be recognized as an \"active\" content control so that tools operate on this\r\n * content.\r\n * @beta\r\n */\r\n// istanbul ignore next\r\nexport function FloatingViewportContent(props: FloatingViewportContentProps) { // eslint-disable-line @typescript-eslint/naming-convention\r\n const { contentId, initialViewState, viewportRef } = props;\r\n const [viewport, setViewport] = React.useState<ScreenViewport | undefined>();\r\n const contentControl = React.useRef<FloatingViewportContentControl | undefined>();\r\n\r\n const viewState = React.useMemo(() => typeof initialViewState === \"function\" ? initialViewState() : initialViewState, [initialViewState]);\r\n const ref = React.useCallback((v: ScreenViewport) => {\r\n setViewport(v);\r\n }, []);\r\n const onViewportRef = useRefs(ref, ...(viewportRef ? [viewportRef] : []));\r\n\r\n React.useEffect(() => {\r\n if (!contentControl.current) {\r\n contentControl.current = new FloatingViewportContentControl(contentId, contentId, null);\r\n ContentViewManager.addFloatingContentControl(contentControl.current);\r\n }\r\n return () => {\r\n if (contentControl.current) {\r\n ContentViewManager.dropFloatingContentControl(contentControl.current);\r\n contentControl.current = undefined;\r\n }\r\n };\r\n }, [contentId]);\r\n\r\n const viewPortControl = React.useMemo(() =>\r\n <FloatingViewport\r\n viewportRef={onViewportRef}\r\n imodel={viewState.iModel}\r\n viewState={viewState}\r\n onContextMenu={props.onContextMenu}\r\n controlId={contentId}\r\n />, [onViewportRef, props.onContextMenu, viewState, contentId]);\r\n\r\n React.useEffect(() => {\r\n if (viewport && contentControl.current) {\r\n contentControl.current.viewport = viewport;\r\n if (null === contentControl.current.reactNode) {\r\n contentControl.current.reactNode = viewPortControl;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n contentControl.current.processViewSelectorChange(viewState.iModel, viewState.id, viewState, viewState.name);\r\n }\r\n }, [viewState, viewPortControl, viewport]);\r\n\r\n React.useEffect(() => {\r\n const onViewClose = (vp: ScreenViewport) => {\r\n if (contentControl.current?.viewport === vp) {\r\n ContentViewManager.dropFloatingContentControl(contentControl.current);\r\n contentControl.current = undefined;\r\n }\r\n };\r\n return IModelApp.viewManager.onViewClose.addListener(onViewClose);\r\n }, []);\r\n\r\n return (\r\n <div onMouseMove={UiShowHideManager.handleContentMouseMove} className=\"uifw-dialog-imodel-content\" style={{ height: \"100%\", position: \"relative\" }}>\r\n <ContentWrapper content={viewPortControl} style={{ height: \"100%\", position: \"relative\" }} />\r\n </div>\r\n );\r\n}\r\n"]}
|
|
@@ -232,8 +232,6 @@ export declare class FrontstageDef {
|
|
|
232
232
|
get isReady(): boolean;
|
|
233
233
|
/** @internal */
|
|
234
234
|
saveChildWindowSizeAndPosition(childWindowId: string, childWindow: Window): void;
|
|
235
|
-
/** @internal */
|
|
236
|
-
setFloatingWidgetBoundsInternal(floatingWidgetId: string, bounds: RectangleProps, inhibitNineZoneStateChangedEvent?: boolean): void;
|
|
237
235
|
/** Method used to possibly change a Popout Widget back to a docked widget if the user was the one closing the popout's child
|
|
238
236
|
* window (i.e. UiFramework.childWindowManager.isClosingChildWindow === false).
|
|
239
237
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontstageDef.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/frontstage/FrontstageDef.tsx"],"names":[],"mappings":"AAKA;;GAEG;AAKH,OAAO,EAAa,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAuB,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzG,OAAO,EAAa,cAAc,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAGL,oBAAoB,EAAE,aAAa,EACpC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,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,CAAC,QAAQ,EAAE,MAAM;IAepC,gCAAgC,CAAC,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc;IAkBjF,6BAA6B,IAAI,MAAM,EAAE;IAOzC,sCAAsC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAa5E,gCAAgC,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS;IAiB5E,OAAO,CAAE,WAAW;IAepB;;OAEG;IACH,IAAW,UAAU;;MAOpB;CACF"}
|
|
@@ -25,11 +25,11 @@ const Frontstage_1 = require("./Frontstage");
|
|
|
25
25
|
const FrontstageManager_1 = require("./FrontstageManager");
|
|
26
26
|
const TimeTracker_1 = require("../configurableui/TimeTracker");
|
|
27
27
|
const PopoutWidget_1 = require("../childwindow/PopoutWidget");
|
|
28
|
+
const Frontstage_2 = require("../widget-panels/Frontstage");
|
|
28
29
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
29
30
|
const ContentDialogManager_1 = require("../dialog/ContentDialogManager");
|
|
30
31
|
const Widget_1 = require("../widgets/Widget");
|
|
31
32
|
const StagePanel_1 = require("../stagepanels/StagePanel");
|
|
32
|
-
const CoreToolDefinitions_1 = require("../tools/CoreToolDefinitions");
|
|
33
33
|
/** FrontstageDef class provides an API for a Frontstage.
|
|
34
34
|
* @public
|
|
35
35
|
*/
|
|
@@ -547,7 +547,7 @@ class FrontstageDef {
|
|
|
547
547
|
async initializeFromProps(props) {
|
|
548
548
|
this._id = props.id;
|
|
549
549
|
this._initialProps = props;
|
|
550
|
-
this._defaultTool = props.defaultTool;
|
|
550
|
+
this._defaultTool = props.defaultTool; // Might be `undefined`, see `toFrontstageProps`.
|
|
551
551
|
if (props.defaultContentId !== undefined)
|
|
552
552
|
this._defaultContentId = props.defaultContentId;
|
|
553
553
|
if (props.contentGroup instanceof ContentGroup_1.ContentGroupProvider) {
|
|
@@ -841,17 +841,6 @@ class FrontstageDef {
|
|
|
841
841
|
const bounds = core_react_1.Rectangle.createFromSize({ width, height }).offset({ x: childWindow.screenX, y: childWindow.screenY });
|
|
842
842
|
widgetDef.popoutBounds = bounds;
|
|
843
843
|
}
|
|
844
|
-
/** @internal */
|
|
845
|
-
setFloatingWidgetBoundsInternal(floatingWidgetId, bounds, inhibitNineZoneStateChangedEvent = false) {
|
|
846
|
-
// istanbul ignore else
|
|
847
|
-
if (this.nineZoneState) {
|
|
848
|
-
const newState = (0, appui_layout_react_1.setFloatingWidgetContainerBounds)(this.nineZoneState, floatingWidgetId, bounds);
|
|
849
|
-
if (inhibitNineZoneStateChangedEvent)
|
|
850
|
-
this._nineZoneState = newState; // set without triggering new render
|
|
851
|
-
else
|
|
852
|
-
this.nineZoneState = newState;
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
844
|
/** Method used to possibly change a Popout Widget back to a docked widget if the user was the one closing the popout's child
|
|
856
845
|
* window (i.e. UiFramework.childWindowManager.isClosingChildWindow === false).
|
|
857
846
|
* @internal
|
|
@@ -891,7 +880,17 @@ class FrontstageDef {
|
|
|
891
880
|
setFloatingWidgetContainerBounds(floatingWidgetId, bounds) {
|
|
892
881
|
if (!this.nineZoneState || !(floatingWidgetId in this.nineZoneState.floatingWidgets.byId))
|
|
893
882
|
return false;
|
|
894
|
-
this.
|
|
883
|
+
let state = (0, Frontstage_2.FrameworkStateReducer)(this.nineZoneState, {
|
|
884
|
+
type: "FLOATING_WIDGET_SET_BOUNDS",
|
|
885
|
+
id: floatingWidgetId,
|
|
886
|
+
bounds,
|
|
887
|
+
}, this);
|
|
888
|
+
state = (0, Frontstage_2.FrameworkStateReducer)(state, {
|
|
889
|
+
type: "FLOATING_WIDGET_SET_USER_SIZED",
|
|
890
|
+
id: floatingWidgetId,
|
|
891
|
+
userSized: true,
|
|
892
|
+
}, this);
|
|
893
|
+
this.nineZoneState = state;
|
|
895
894
|
return true;
|
|
896
895
|
}
|
|
897
896
|
getFloatingWidgetContainerIds() {
|
|
@@ -955,7 +954,7 @@ function toFrontstageProps(config) {
|
|
|
955
954
|
const { contentManipulation, viewNavigation, toolSettings, statusBar, topPanel, leftPanel, bottomPanel, rightPanel, ...other } = config;
|
|
956
955
|
const props = {
|
|
957
956
|
...other,
|
|
958
|
-
defaultTool:
|
|
957
|
+
defaultTool: undefined,
|
|
959
958
|
toolSettings: toolSettings ? toZoneElement(toolSettings) : undefined,
|
|
960
959
|
statusBar: statusBar ? toZoneElement(statusBar) : undefined,
|
|
961
960
|
contentManipulationTools: contentManipulation ? toZoneElement(contentManipulation) : undefined,
|