@sapui5/sap.ui.vk 1.136.1 → 1.139.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/package.json +1 -1
- package/src/sap/ui/vk/.library +9 -1
- package/src/sap/ui/vk/AnimationPlayback.js +1 -1
- package/src/sap/ui/vk/AnimationPlayer.js +2 -2
- package/src/sap/ui/vk/AnimationSequence.js +1 -1
- package/src/sap/ui/vk/AnimationTimeSlider.js +1 -1
- package/src/sap/ui/vk/AnimationTrack.js +1 -1
- package/src/sap/ui/vk/Annotation.js +2 -2
- package/src/sap/ui/vk/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/Camera.js +1 -1
- package/src/sap/ui/vk/ContentConnector.js +19 -15
- package/src/sap/ui/vk/ContentManager.js +1 -1
- package/src/sap/ui/vk/ContentResource.js +3 -2
- package/src/sap/ui/vk/ContentType.js +1 -1
- package/src/sap/ui/vk/Core.js +1 -3
- package/src/sap/ui/vk/DownloadManager.js +1 -1
- package/src/sap/ui/vk/DrawerToolbar.js +152 -19
- package/src/sap/ui/vk/DrawerToolbarButton.js +12 -1
- package/src/sap/ui/vk/DvlException.js +1 -1
- package/src/sap/ui/vk/FlexibleControl.js +1 -2
- package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -2
- package/src/sap/ui/vk/Highlight.js +1 -1
- package/src/sap/ui/vk/ImageContentManager.js +1 -1
- package/src/sap/ui/vk/JointUtils.js +1 -1
- package/src/sap/ui/vk/LayerProxy.js +1 -1
- package/src/sap/ui/vk/LegendItem.js +1 -1
- package/src/sap/ui/vk/ListPanel.js +1 -1
- package/src/sap/ui/vk/ListPanelStack.js +1 -1
- package/src/sap/ui/vk/Loco.js +1 -1
- package/src/sap/ui/vk/Material.js +1 -1
- package/src/sap/ui/vk/NativeViewport.js +1 -1
- package/src/sap/ui/vk/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/NodeProxy.js +1 -1
- package/src/sap/ui/vk/NodeUtils.js +1 -1
- package/src/sap/ui/vk/Notifications.js +1 -1
- package/src/sap/ui/vk/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/OutputSettings.js +0 -1
- package/src/sap/ui/vk/Overlay.js +1 -1
- package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/ProgressIndicator.js +1 -1
- package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
- package/src/sap/ui/vk/RedlineConversation.js +1 -1
- package/src/sap/ui/vk/RedlineDesign.js +1 -1
- package/src/sap/ui/vk/RedlineElement.js +1 -1
- package/src/sap/ui/vk/RedlineElementComment.js +1 -1
- package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
- package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
- package/src/sap/ui/vk/RedlineElementLine.js +1 -1
- package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
- package/src/sap/ui/vk/RedlineElementText.js +1 -1
- package/src/sap/ui/vk/RedlineSurface.js +2 -2
- package/src/sap/ui/vk/SafeArea.js +1 -1
- package/src/sap/ui/vk/Scene.js +16 -1
- package/src/sap/ui/vk/SceneTree.js +23 -9
- package/src/sap/ui/vk/StepNavigation.js +1 -2
- package/src/sap/ui/vk/Texture.js +2 -2
- package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
- package/src/sap/ui/vk/ToggleMenuItem.js +7 -4
- package/src/sap/ui/vk/ToggleMenuItemRenderer.js +224 -0
- package/src/sap/ui/vk/Toolbar.js +62 -100
- package/src/sap/ui/vk/View.js +7 -13
- package/src/sap/ui/vk/ViewGallery.js +2 -2
- package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
- package/src/sap/ui/vk/ViewGroup.js +1 -1
- package/src/sap/ui/vk/ViewManager.js +1 -1
- package/src/sap/ui/vk/ViewStateManager.js +4 -11
- package/src/sap/ui/vk/ViewStateManagerBase.js +4 -4
- package/src/sap/ui/vk/Viewer.js +408 -234
- package/src/sap/ui/vk/Viewport.js +2 -2
- package/src/sap/ui/vk/ViewportBase.js +24 -70
- package/src/sap/ui/vk/dvl/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/dvl/ContentManager.js +1 -1
- package/src/sap/ui/vk/dvl/GraphicsCore.js +1 -1
- package/src/sap/ui/vk/dvl/LayerProxy.js +1 -1
- package/src/sap/ui/vk/dvl/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/dvl/NodeProxy.js +1 -1
- package/src/sap/ui/vk/dvl/Scene.js +1 -1
- package/src/sap/ui/vk/dvl/ViewStateManager.js +1 -1
- package/src/sap/ui/vk/dvl/Viewport.js +1 -1
- package/src/sap/ui/vk/ecad/ElementsPanel.js +627 -132
- package/src/sap/ui/vk/ecad/LayersPanel.js +247 -131
- package/src/sap/ui/vk/i18n/messagebundle.properties +70 -38
- package/src/sap/ui/vk/i18n/messagebundle_ar.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_bg.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ca.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_cs.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_cy.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_da.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_de.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_el.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_en.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +31 -12
- package/src/sap/ui/vk/i18n/messagebundle_es.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_et.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_fi.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_fr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_hi.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_hr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_hu.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_id.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_it.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_iw.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ja.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_kk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ko.properties +27 -9
- package/src/sap/ui/vk/i18n/messagebundle_lt.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_lv.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_mk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ms.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_nl.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_no.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_pl.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_pt.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ro.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ru.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sh.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sl.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sv.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_th.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_tr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_uk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_vi.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +30 -12
- package/src/sap/ui/vk/library.js +7 -4
- package/src/sap/ui/vk/measurements/Angle.js +1 -1
- package/src/sap/ui/vk/measurements/Area.js +1 -1
- package/src/sap/ui/vk/measurements/Distance.js +1 -1
- package/src/sap/ui/vk/measurements/Edge.js +1 -1
- package/src/sap/ui/vk/measurements/Face.js +1 -1
- package/src/sap/ui/vk/measurements/Feature.js +1 -1
- package/src/sap/ui/vk/measurements/Vertex.js +1 -1
- package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
- package/src/sap/ui/vk/pdf/Page.js +9 -10
- package/src/sap/ui/vk/pdf/Utils.js +4 -2
- package/src/sap/ui/vk/pdf/Viewport.js +5 -8
- package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/svg/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/svg/ContentManager.js +2 -1
- package/src/sap/ui/vk/svg/HotspotHelper.js +2 -2
- package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
- package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/svg/Scene.js +1 -1
- package/src/sap/ui/vk/svg/SceneBuilder.js +12 -4
- package/src/sap/ui/vk/svg/ViewStateManager.js +2 -2
- package/src/sap/ui/vk/svg/Viewport.js +192 -2
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.8.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.8.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_belize_base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_bluecrystal_base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_horizon/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_dark/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_hcb/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_hcw/library.source.less +0 -5
- package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
- package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
- package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/threejs/Billboard.js +23 -11
- package/src/sap/ui/vk/threejs/Callout.js +11 -1
- package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/threejs/ContentManager.js +3 -2
- package/src/sap/ui/vk/threejs/DetailView.js +1 -1
- package/src/sap/ui/vk/threejs/HighlightPlayer.js +14 -22
- package/src/sap/ui/vk/threejs/Material.js +2 -2
- package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/threejs/NodeProxy.js +9 -11
- package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/threejs/OutlineRenderer.js +4 -10
- package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
- package/src/sap/ui/vk/threejs/Scene.js +1 -15
- package/src/sap/ui/vk/threejs/SceneBuilder.js +17 -4
- package/src/sap/ui/vk/threejs/Texture.js +2 -2
- package/src/sap/ui/vk/threejs/ThreeExtensions.js +10 -174
- package/src/sap/ui/vk/threejs/ThreeUtils.js +7 -18
- package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
- package/src/sap/ui/vk/threejs/ViewStateManager.js +752 -447
- package/src/sap/ui/vk/threejs/Viewport.js +43 -33
- package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
- package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeItemGroup.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Gizmo.js +1 -1
- package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
- package/src/sap/ui/vk/tools/MoveTool.js +1 -1
- package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +2 -2
- package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
- package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
- package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
- package/src/sap/ui/vk/tools/RotateTool.js +1 -1
- package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
- package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
- package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
- package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Tool.js +1 -1
- package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
- package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/TooltipToolHandler.js +5 -0
- package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/totara/TotaraLoader.js +5 -1
- package/src/sap/ui/vk/ve/matai.js +1 -1
- package/src/sap/ui/vk/ve/matai.wasm +0 -0
- package/ui5.yaml +5 -3
- package/src/sap/ui/vk/ToolbarRenderer.js +0 -41
- package/src/sap/ui/vk/ViewerRenderer.js +0 -48
- package/src/sap/ui/vk/ecad/ElementsPanelRenderer.js +0 -41
- package/src/sap/ui/vk/ecad/LayersPanelRenderer.js +0 -41
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.4.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.4.woff2 +0 -0
- package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +0 -1445
package/src/sap/ui/vk/Viewer.js
CHANGED
|
@@ -10,6 +10,7 @@ sap.ui.define([
|
|
|
10
10
|
"./library",
|
|
11
11
|
"sap/ui/core/Core",
|
|
12
12
|
"sap/ui/core/Control",
|
|
13
|
+
"sap/ui/model/json/JSONModel",
|
|
13
14
|
"./Scene",
|
|
14
15
|
"./ContentResource",
|
|
15
16
|
"./ContentConnector",
|
|
@@ -33,9 +34,11 @@ sap.ui.define([
|
|
|
33
34
|
"./Viewport",
|
|
34
35
|
"./NativeViewport",
|
|
35
36
|
"./RedlineDesign",
|
|
36
|
-
"./ViewerRenderer",
|
|
37
37
|
"./SelectionMode",
|
|
38
38
|
"./DrawerToolbar",
|
|
39
|
+
"./pdf/PageGallery",
|
|
40
|
+
"./ecad/LayersPanel",
|
|
41
|
+
"./ecad/ElementsPanel",
|
|
39
42
|
"./getResourceBundle",
|
|
40
43
|
"./cssColorToColor",
|
|
41
44
|
"./colorToCSSColor",
|
|
@@ -48,6 +51,7 @@ sap.ui.define([
|
|
|
48
51
|
vkLibrary,
|
|
49
52
|
core,
|
|
50
53
|
Control,
|
|
54
|
+
JSONModel,
|
|
51
55
|
Scene,
|
|
52
56
|
ContentResource,
|
|
53
57
|
ContentConnector,
|
|
@@ -71,9 +75,11 @@ sap.ui.define([
|
|
|
71
75
|
Viewport,
|
|
72
76
|
NativeViewport,
|
|
73
77
|
RedlineDesign,
|
|
74
|
-
ViewerRenderer,
|
|
75
78
|
SelectionMode,
|
|
76
79
|
DrawerToolbar,
|
|
80
|
+
PageGallery,
|
|
81
|
+
LayersPanel,
|
|
82
|
+
ElementsPanel,
|
|
77
83
|
getResourceBundle,
|
|
78
84
|
cssColorToColor,
|
|
79
85
|
colorToCSSColor,
|
|
@@ -93,7 +99,7 @@ sap.ui.define([
|
|
|
93
99
|
* @param {object} [mSettings] initial settings for the new Viewer control
|
|
94
100
|
* @public
|
|
95
101
|
* @author SAP SE
|
|
96
|
-
* @version 1.
|
|
102
|
+
* @version 1.139.0
|
|
97
103
|
* @since 1.32.0
|
|
98
104
|
* @extends sap.ui.core.Control
|
|
99
105
|
* @alias sap.ui.vk.Viewer
|
|
@@ -152,6 +158,48 @@ sap.ui.define([
|
|
|
152
158
|
type: "boolean",
|
|
153
159
|
defaultValue: false
|
|
154
160
|
},
|
|
161
|
+
/**
|
|
162
|
+
* Disables the ECAD layers panel control
|
|
163
|
+
*/
|
|
164
|
+
enableLayersPanel: {
|
|
165
|
+
type: "boolean",
|
|
166
|
+
defaultValue: true
|
|
167
|
+
},
|
|
168
|
+
/**
|
|
169
|
+
* Shows or hides the ECAD layers panel control
|
|
170
|
+
* */
|
|
171
|
+
showLayersPanel: {
|
|
172
|
+
type: "boolean",
|
|
173
|
+
defaultValue: true
|
|
174
|
+
},
|
|
175
|
+
/**
|
|
176
|
+
* Disables the ECAD elements panel control
|
|
177
|
+
*/
|
|
178
|
+
enableElementsPanel: {
|
|
179
|
+
type: "boolean",
|
|
180
|
+
defaultValue: true
|
|
181
|
+
},
|
|
182
|
+
/**
|
|
183
|
+
* Shows or hides the ECAD elements panel control
|
|
184
|
+
*/
|
|
185
|
+
showElementsPanel: {
|
|
186
|
+
type: "boolean",
|
|
187
|
+
defaultValue: true
|
|
188
|
+
},
|
|
189
|
+
/**
|
|
190
|
+
* Disables the page gallery control
|
|
191
|
+
*/
|
|
192
|
+
enablePageGallery: {
|
|
193
|
+
type: "boolean",
|
|
194
|
+
defaultValue: true
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
* Shows or hides the page gallery control
|
|
198
|
+
*/
|
|
199
|
+
showPageGallery: {
|
|
200
|
+
type: "boolean",
|
|
201
|
+
defaultValue: true
|
|
202
|
+
},
|
|
155
203
|
/**
|
|
156
204
|
* Shows or hides Toolbar control
|
|
157
205
|
*/
|
|
@@ -256,6 +304,13 @@ sap.ui.define([
|
|
|
256
304
|
premultipliedAlpha: false
|
|
257
305
|
}
|
|
258
306
|
},
|
|
307
|
+
/**
|
|
308
|
+
* Shows or hides showing of all hotspots toggle button
|
|
309
|
+
*/
|
|
310
|
+
hotspotsEnabled: {
|
|
311
|
+
type: "boolean",
|
|
312
|
+
defaultValue: true
|
|
313
|
+
},
|
|
259
314
|
/**
|
|
260
315
|
* Enables or disables showing of all hotspots
|
|
261
316
|
*/
|
|
@@ -268,14 +323,14 @@ sap.ui.define([
|
|
|
268
323
|
*/
|
|
269
324
|
hotspotColorABGR: {
|
|
270
325
|
type: "int",
|
|
271
|
-
defaultValue:
|
|
326
|
+
defaultValue: 0x590000BB
|
|
272
327
|
},
|
|
273
328
|
/**
|
|
274
329
|
* Color used for highlighting Smart2D hotspots in the CSS Color format.
|
|
275
330
|
*/
|
|
276
331
|
hotspotColor: {
|
|
277
332
|
type: "sap.ui.core.CSSColor",
|
|
278
|
-
defaultValue: "rgba(
|
|
333
|
+
defaultValue: "rgba(89, 0, 0, 0.73)"
|
|
279
334
|
}
|
|
280
335
|
},
|
|
281
336
|
|
|
@@ -439,6 +494,79 @@ sap.ui.define([
|
|
|
439
494
|
}
|
|
440
495
|
}
|
|
441
496
|
}
|
|
497
|
+
},
|
|
498
|
+
|
|
499
|
+
renderer: {
|
|
500
|
+
apiVersion: 2,
|
|
501
|
+
|
|
502
|
+
render: function(rm, control) {
|
|
503
|
+
rm.openStart("div", control);
|
|
504
|
+
rm.class("sapVizKitViewer");
|
|
505
|
+
if (control.getWidth()) {
|
|
506
|
+
rm.style("width", control.getWidth());
|
|
507
|
+
}
|
|
508
|
+
if (control.getHeight()) {
|
|
509
|
+
rm.style("height", control.getHeight());
|
|
510
|
+
}
|
|
511
|
+
rm.openEnd();
|
|
512
|
+
rm.renderControl(control._layout);
|
|
513
|
+
rm.renderControl(control._progressIndicator);
|
|
514
|
+
rm.close("div");
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
|
|
518
|
+
constructor: function(id, settings) {
|
|
519
|
+
Control.apply(this, arguments);
|
|
520
|
+
|
|
521
|
+
Object.assign(this._data, {
|
|
522
|
+
sceneTree: {
|
|
523
|
+
supported: false,
|
|
524
|
+
enabled: this.getEnableSceneTree(),
|
|
525
|
+
visible: this.getShowSceneTree()
|
|
526
|
+
},
|
|
527
|
+
stepNavigation: {
|
|
528
|
+
supported: false,
|
|
529
|
+
enabled: this.getEnableStepNavigation(),
|
|
530
|
+
visible: this.getShowStepNavigation()
|
|
531
|
+
},
|
|
532
|
+
layersPanel: {
|
|
533
|
+
supported: false,
|
|
534
|
+
enabled: this.getEnableLayersPanel(),
|
|
535
|
+
visible: this.getShowLayersPanel()
|
|
536
|
+
},
|
|
537
|
+
elementsPanel: {
|
|
538
|
+
supported: false,
|
|
539
|
+
enabled: this.getEnableElementsPanel(),
|
|
540
|
+
visible: this.getShowElementsPanel()
|
|
541
|
+
},
|
|
542
|
+
pageGallery: {
|
|
543
|
+
supported: false,
|
|
544
|
+
enabled: this.getEnablePageGallery(),
|
|
545
|
+
visible: this.getShowPageGallery(),
|
|
546
|
+
currentPageIndex: 0
|
|
547
|
+
},
|
|
548
|
+
miniMap: {
|
|
549
|
+
supported: false,
|
|
550
|
+
enabled: this.getEnableMiniMap(),
|
|
551
|
+
visible: this.getShowMiniMap()
|
|
552
|
+
},
|
|
553
|
+
toolbar: {
|
|
554
|
+
title: this.getToolbarTitle(),
|
|
555
|
+
enabled: this.getEnableToolbar()
|
|
556
|
+
},
|
|
557
|
+
drawerToolbar: {
|
|
558
|
+
visible: this.getShowDrawerToolbar()
|
|
559
|
+
},
|
|
560
|
+
hotspots: {
|
|
561
|
+
supported: false,
|
|
562
|
+
enabled: this.getHotspotsEnabled(),
|
|
563
|
+
showAll: this.getShowAllHotspots(),
|
|
564
|
+
colorABGR: this.getHotspotColorABGR(),
|
|
565
|
+
color: this.getHotspotColor()
|
|
566
|
+
},
|
|
567
|
+
shouldTrackVisibilityChanges: this.getShouldTrackVisibilityChanges(),
|
|
568
|
+
recursiveSelection: this.getRecursiveSelection()
|
|
569
|
+
});
|
|
442
570
|
}
|
|
443
571
|
});
|
|
444
572
|
|
|
@@ -446,41 +574,6 @@ sap.ui.define([
|
|
|
446
574
|
this._inApplySettings = true;
|
|
447
575
|
Control.prototype.applySettings.apply(this, arguments);
|
|
448
576
|
delete this._inApplySettings;
|
|
449
|
-
|
|
450
|
-
if (this._viewStateManager) {
|
|
451
|
-
this._viewStateManager.setShouldTrackVisibilityChanges(this.getShouldTrackVisibilityChanges());
|
|
452
|
-
this._viewStateManager.setRecursiveSelection(this.getRecursiveSelection());
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
// _componentsState stores the default state of the scene tree and step navigation.
|
|
456
|
-
// It also stores the last user interaction such as show/hide.
|
|
457
|
-
// These settings are used to restore states after switching between 2D and 3D.
|
|
458
|
-
this._componentsState = {
|
|
459
|
-
sceneTree: {
|
|
460
|
-
defaultEnable: this.getEnableSceneTree(),
|
|
461
|
-
// shouldBeEnabled refers to certain scenarios when the scene tree should not be displayed (for example Smart2D files)
|
|
462
|
-
shouldBeEnabled: true,
|
|
463
|
-
// saving the last state set by user interaction (turn scene tree ON/OFF)
|
|
464
|
-
userInteractionShow: this.getShowSceneTree()
|
|
465
|
-
},
|
|
466
|
-
stepNavigation: {
|
|
467
|
-
defaultEnable: this.getEnableStepNavigation(),
|
|
468
|
-
userInteractionShow: this.getShowStepNavigation()
|
|
469
|
-
},
|
|
470
|
-
miniMap: {
|
|
471
|
-
defaultEnable: this.getEnableMiniMap(),
|
|
472
|
-
userInteractionShow: this.getShowMiniMap()
|
|
473
|
-
},
|
|
474
|
-
progressIndicator: {
|
|
475
|
-
defaultEnable: this.getEnableProgressIndicator()
|
|
476
|
-
},
|
|
477
|
-
messagePopover: {
|
|
478
|
-
defaultEnable: this.getEnableNotifications()
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
// We initialize the viewer with the both scene tree and step navigation disabled.
|
|
482
|
-
this.setEnableSceneTree(false);
|
|
483
|
-
this.setEnableStepNavigation(false);
|
|
484
577
|
};
|
|
485
578
|
|
|
486
579
|
Viewer.prototype.init = function() {
|
|
@@ -495,7 +588,38 @@ sap.ui.define([
|
|
|
495
588
|
this._contentConnector.attachContentChangesFinished(this._handleContentChangesFinished, this);
|
|
496
589
|
this._contentConnector.attachContentChangesProgress(this._handleContentChangesProgress, this);
|
|
497
590
|
|
|
591
|
+
this._data = {
|
|
592
|
+
sceneTree: {},
|
|
593
|
+
stepNavigation: {},
|
|
594
|
+
layersPanel: {},
|
|
595
|
+
elementsPanel: {},
|
|
596
|
+
pageGallery: {},
|
|
597
|
+
miniMap: {},
|
|
598
|
+
toolbar: {},
|
|
599
|
+
drawerToolbar: {},
|
|
600
|
+
hotspots: {}
|
|
601
|
+
};
|
|
602
|
+
this._model = new JSONModel(this._data);
|
|
603
|
+
this._model.attachPropertyChange(function(event) {
|
|
604
|
+
const value = event.getParameter("value");
|
|
605
|
+
switch (event.getParameter("path")) {
|
|
606
|
+
case "/sceneTree/visible": this.setShowSceneTree(value); break;
|
|
607
|
+
case "/stepNavigation/visible": this.setShowStepNavigation(value); break;
|
|
608
|
+
case "/layersPanel/visible": this.setShowLayersPanel(value); break;
|
|
609
|
+
case "/elementsPanel/visible": this.setShowElementsPanel(value); break;
|
|
610
|
+
case "/pageGallery/visible": this.setShowPageGallery(value); break;
|
|
611
|
+
case "/miniMap/visible": this.setShowMiniMap(value); break;
|
|
612
|
+
case "/hotspots/showAll": this.setShowAllHotspots(value); break;
|
|
613
|
+
case "/hotspots/colorABGR": this.setHotspotColorABGR(value); break;
|
|
614
|
+
case "/hotspots/color": this.setHotspotColor(value); break;
|
|
615
|
+
default: break;
|
|
616
|
+
}
|
|
617
|
+
}, this);
|
|
618
|
+
this.setModel(this._model, "_internal");
|
|
619
|
+
|
|
498
620
|
this._viewStateManager = new ViewStateManager(this.getId() + "-viewstatemanager", {
|
|
621
|
+
shouldTrackVisibilityChanges: "{_internal>/shouldTrackVisibilityChanges}",
|
|
622
|
+
recursiveSelection: "{_internal>/recursiveSelection}",
|
|
499
623
|
contentConnector: this._contentConnector
|
|
500
624
|
});
|
|
501
625
|
this.setAggregation("viewStateManager", this._viewStateManager);
|
|
@@ -521,6 +645,9 @@ sap.ui.define([
|
|
|
521
645
|
this._stepNavigation = null;
|
|
522
646
|
this._sceneTree = null;
|
|
523
647
|
this._drawerToolbar = null;
|
|
648
|
+
this._pageGallery = null;
|
|
649
|
+
this._layersPanel = null;
|
|
650
|
+
this._elementsPanel = null;
|
|
524
651
|
|
|
525
652
|
this._staticAreaParent = null;
|
|
526
653
|
this._staticAreaNextSibling = null;
|
|
@@ -528,8 +655,8 @@ sap.ui.define([
|
|
|
528
655
|
this.attachBrowserEvent("fullscreenchange", this._handleFullscreenChange, this);
|
|
529
656
|
|
|
530
657
|
this._toolbar = new Toolbar({
|
|
531
|
-
title:
|
|
532
|
-
visible:
|
|
658
|
+
title: "{_internal>/toolbar/title}",
|
|
659
|
+
visible: "{_internal>/toolbar/enabled}",
|
|
533
660
|
viewer: this
|
|
534
661
|
});
|
|
535
662
|
|
|
@@ -589,16 +716,11 @@ sap.ui.define([
|
|
|
589
716
|
|
|
590
717
|
Localization.detachChange(this._onLocalizationChanged);
|
|
591
718
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
this._viewport.destroy();
|
|
595
|
-
this._viewport = null;
|
|
596
|
-
}
|
|
719
|
+
this._viewport?.destroy();
|
|
720
|
+
this._viewport = null;
|
|
597
721
|
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
this._nativeViewport = null;
|
|
601
|
-
}
|
|
722
|
+
this._nativeViewport?.destroy();
|
|
723
|
+
this._nativeViewport = null;
|
|
602
724
|
|
|
603
725
|
// All scenes will be destroyed and all viewports will be unregistered by GraphicsCore.destroy.
|
|
604
726
|
this._setMainScene(null);
|
|
@@ -611,6 +733,7 @@ sap.ui.define([
|
|
|
611
733
|
this._viewStateManager = null;
|
|
612
734
|
this._contentConnector = null;
|
|
613
735
|
this._viewManager = null;
|
|
736
|
+
this._model = null;
|
|
614
737
|
|
|
615
738
|
this._staticAreaParent = null;
|
|
616
739
|
this._staticAreaNextSibling = null;
|
|
@@ -668,40 +791,85 @@ sap.ui.define([
|
|
|
668
791
|
};
|
|
669
792
|
|
|
670
793
|
Viewer.prototype._setMainScene = function(scene) {
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
794
|
+
this._sceneTree?.destroy();
|
|
795
|
+
this._sceneTree = null;
|
|
796
|
+
if (this._stepNavigation) {
|
|
797
|
+
this._layout.removeItem(this._stepNavigation);
|
|
798
|
+
this._viewport?.removeContent(this._stepNavigation);
|
|
799
|
+
this._stepNavigation.destroy();
|
|
800
|
+
this._stepNavigation = null;
|
|
801
|
+
}
|
|
802
|
+
this._layersPanel?.destroy();
|
|
803
|
+
this._layersPanel = null;
|
|
804
|
+
this._elementsPanel?.destroy();
|
|
805
|
+
this._elementsPanel = null;
|
|
806
|
+
this._pageGallery?.destroy();
|
|
807
|
+
this._pageGallery = null;
|
|
808
|
+
this._mainScene = scene instanceof Scene ? scene : null;
|
|
809
|
+
|
|
810
|
+
const isSVG = scene?.getMetadata?.().getName() === "sap.ui.vk.svg.Scene";
|
|
811
|
+
const isECAD = isSVG && scene.isECADScene();
|
|
812
|
+
const isPDF = scene?.isA?.("sap.ui.vk.pdf.Document");
|
|
813
|
+
const data = this._data;
|
|
814
|
+
data.sceneTree.supported = data.stepNavigation.supported = (scene instanceof Scene) && !isECAD;
|
|
815
|
+
data.layersPanel.supported = data.elementsPanel.supported = isECAD;
|
|
816
|
+
data.hotspots.supported = isSVG && !isECAD;
|
|
817
|
+
data.miniMap.supported = isSVG;
|
|
818
|
+
data.pageGallery.supported = isPDF;
|
|
819
|
+
this._model?.updateBindings();
|
|
820
|
+
|
|
821
|
+
if (this._mainScene) {
|
|
822
|
+
// Set the scene tree & step navigation state based on default settings and last user interaction (if any).
|
|
823
|
+
if (data.sceneTree.supported && data.sceneTree.enabled) {
|
|
824
|
+
this._sceneTree = new SceneTree({
|
|
825
|
+
layoutData: new SplitterLayoutData({
|
|
826
|
+
size: "320px",
|
|
827
|
+
minSize: 200
|
|
828
|
+
}),
|
|
829
|
+
viewStateManager: this._viewStateManager,
|
|
830
|
+
contentConnector: this._contentConnector
|
|
831
|
+
});
|
|
832
|
+
}
|
|
689
833
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
this._instantiateStepNavigation();
|
|
693
|
-
this.setShowStepNavigation(this._componentsState.stepNavigation.userInteractionShow);
|
|
694
|
-
}
|
|
834
|
+
if (data.stepNavigation.supported && data.stepNavigation.enabled) {
|
|
835
|
+
this._instantiateStepNavigation();
|
|
695
836
|
}
|
|
696
837
|
|
|
697
|
-
if (
|
|
698
|
-
this.
|
|
838
|
+
if (data.layersPanel.supported && data.layersPanel.enabled) {
|
|
839
|
+
this._layersPanel = new LayersPanel({
|
|
840
|
+
layoutData: new SplitterLayoutData({
|
|
841
|
+
size: "320px",
|
|
842
|
+
minSize: 200
|
|
843
|
+
}),
|
|
844
|
+
contentConnector: this._contentConnector,
|
|
845
|
+
viewStateManager: this._viewStateManager
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
if (data.elementsPanel.supported && data.elementsPanel.enabled) {
|
|
850
|
+
this._elementsPanel = new ElementsPanel({
|
|
851
|
+
contentConnector: this._contentConnector,
|
|
852
|
+
viewStateManager: this._viewStateManager,
|
|
853
|
+
layoutData: new SplitterLayoutData({
|
|
854
|
+
size: "320px",
|
|
855
|
+
minSize: 200
|
|
856
|
+
})
|
|
857
|
+
});
|
|
699
858
|
}
|
|
700
|
-
} else {
|
|
701
|
-
this._mainScene = null;
|
|
702
|
-
this.setEnableSceneTree(false);
|
|
703
|
-
this.setEnableStepNavigation(false);
|
|
704
859
|
}
|
|
860
|
+
|
|
861
|
+
if (data.pageGallery.supported) {
|
|
862
|
+
data.pageGallery.currentPageIndex = 0;
|
|
863
|
+
this._pageGallery = new PageGallery({
|
|
864
|
+
layoutData: new SplitterLayoutData({
|
|
865
|
+
size: "320px",
|
|
866
|
+
minSize: 200
|
|
867
|
+
}),
|
|
868
|
+
contentConnector: this._contentConnector,
|
|
869
|
+
currentPageIndex: "{_internal>/pageGallery/currentPageIndex}"
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
|
|
705
873
|
return this;
|
|
706
874
|
};
|
|
707
875
|
|
|
@@ -747,13 +915,14 @@ sap.ui.define([
|
|
|
747
915
|
this._viewport = new Viewport(this.getId() + "-viewport", {
|
|
748
916
|
viewStateManager: this._viewStateManager,
|
|
749
917
|
selectionMode: SelectionMode.Exclusive,
|
|
750
|
-
contentConnector: this._contentConnector // content connector must be the last parameter in the list!
|
|
918
|
+
contentConnector: this._contentConnector, // content connector must be the last parameter in the list!
|
|
919
|
+
showAllHotspots: "{_internal>/hotspots/showAll}",
|
|
920
|
+
hotspotColorABGR: "{_internal>/hotspots/colorABGR}",
|
|
921
|
+
hotspotColor: "{_internal>/hotspots/color}"
|
|
751
922
|
});
|
|
752
923
|
|
|
753
|
-
this._viewport.attachEvent("viewActivated", this._onViewportViewActivated, this);
|
|
754
|
-
|
|
755
924
|
this._drawerToolbar = new DrawerToolbar({
|
|
756
|
-
visible:
|
|
925
|
+
visible: "{_internal>/drawerToolbar/visible}",
|
|
757
926
|
expanded: true,
|
|
758
927
|
viewport: this._viewport
|
|
759
928
|
});
|
|
@@ -807,138 +976,182 @@ sap.ui.define([
|
|
|
807
976
|
return this._redlineDesign;
|
|
808
977
|
};
|
|
809
978
|
|
|
810
|
-
Viewer.prototype.setEnableSceneTree = function(
|
|
811
|
-
this.setProperty("enableSceneTree",
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
979
|
+
Viewer.prototype.setEnableSceneTree = function(value) {
|
|
980
|
+
this.setProperty("enableSceneTree", value, true);
|
|
981
|
+
this._data.sceneTree.enabled = value;
|
|
982
|
+
this._model.updateBindings();
|
|
983
|
+
return this;
|
|
984
|
+
};
|
|
985
|
+
|
|
986
|
+
Viewer.prototype.setShowSceneTree = function(value) {
|
|
987
|
+
this.setProperty("showSceneTree", value, true);
|
|
988
|
+
this._data.sceneTree.visible = value;
|
|
989
|
+
this._model.updateBindings();
|
|
815
990
|
this._updateLayout();
|
|
816
991
|
return this;
|
|
817
992
|
};
|
|
818
993
|
|
|
819
|
-
Viewer.prototype.
|
|
820
|
-
this.setProperty("
|
|
821
|
-
this.
|
|
994
|
+
Viewer.prototype.setEnableStepNavigation = function(value) {
|
|
995
|
+
this.setProperty("enableStepNavigation", value, true);
|
|
996
|
+
this._data.stepNavigation.enabled = value;
|
|
997
|
+
this._model.updateBindings();
|
|
998
|
+
return this;
|
|
999
|
+
};
|
|
1000
|
+
|
|
1001
|
+
Viewer.prototype.setShowStepNavigation = function(value) {
|
|
1002
|
+
this.setProperty("showStepNavigation", value, true);
|
|
1003
|
+
this._data.stepNavigation.visible = value;
|
|
1004
|
+
this._model.updateBindings();
|
|
1005
|
+
return this;
|
|
1006
|
+
};
|
|
1007
|
+
|
|
1008
|
+
Viewer.prototype.setEnableLayersPanel = function(value) {
|
|
1009
|
+
this.setProperty("enableLayersPanel", value, true);
|
|
1010
|
+
this._data.layersPanel.enabled = value;
|
|
1011
|
+
this._model.updateBindings();
|
|
1012
|
+
return this;
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
Viewer.prototype.setShowLayersPanel = function(value) {
|
|
1016
|
+
this.setProperty("showLayersPanel", value, true);
|
|
1017
|
+
this._data.layersPanel.visible = value;
|
|
1018
|
+
this._model.updateBindings();
|
|
822
1019
|
this._updateLayout();
|
|
823
1020
|
return this;
|
|
824
1021
|
};
|
|
825
1022
|
|
|
826
|
-
Viewer.prototype.
|
|
827
|
-
this.setProperty("
|
|
1023
|
+
Viewer.prototype.setEnableElementsPanel = function(value) {
|
|
1024
|
+
this.setProperty("enableElementsPanel", value, true);
|
|
1025
|
+
this._data.elementsPanel.enabled = value;
|
|
1026
|
+
this._model.updateBindings();
|
|
1027
|
+
return this;
|
|
1028
|
+
};
|
|
1029
|
+
|
|
1030
|
+
Viewer.prototype.setShowElementsPanel = function(value) {
|
|
1031
|
+
this.setProperty("showElementsPanel", value, true);
|
|
1032
|
+
this._data.elementsPanel.visible = value;
|
|
1033
|
+
this._model.updateBindings();
|
|
828
1034
|
this._updateLayout();
|
|
829
1035
|
return this;
|
|
830
1036
|
};
|
|
831
1037
|
|
|
832
|
-
Viewer.prototype.
|
|
833
|
-
this.setProperty("
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
1038
|
+
Viewer.prototype.setEnablePageGallery = function(value) {
|
|
1039
|
+
this.setProperty("enablePageGallery", value, true);
|
|
1040
|
+
this._data.pageGallery.enabled = value;
|
|
1041
|
+
this._model.updateBindings();
|
|
1042
|
+
return this;
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1045
|
+
Viewer.prototype.setShowPageGallery = function(value) {
|
|
1046
|
+
this.setProperty("showPageGallery", value, true);
|
|
1047
|
+
this._data.pageGallery.visible = value;
|
|
1048
|
+
this._model.updateBindings();
|
|
837
1049
|
this._updateLayout();
|
|
838
1050
|
return this;
|
|
839
1051
|
};
|
|
840
1052
|
|
|
841
|
-
Viewer.prototype.
|
|
842
|
-
this.setProperty("
|
|
1053
|
+
Viewer.prototype.setEnableMiniMap = function(value) {
|
|
1054
|
+
this.setProperty("enableMiniMap", value, true);
|
|
1055
|
+
this._data.miniMap.enabled = value;
|
|
1056
|
+
this._model.updateBindings();
|
|
843
1057
|
this._updateLayout();
|
|
844
1058
|
return this;
|
|
845
1059
|
};
|
|
846
1060
|
|
|
847
|
-
Viewer.prototype.setShowMiniMap = function(
|
|
848
|
-
this.setProperty("showMiniMap",
|
|
1061
|
+
Viewer.prototype.setShowMiniMap = function(value) {
|
|
1062
|
+
this.setProperty("showMiniMap", value, true);
|
|
1063
|
+
this._data.miniMap.visible = value;
|
|
1064
|
+
this._model.updateBindings();
|
|
849
1065
|
this._updateLayout();
|
|
850
1066
|
return this;
|
|
851
1067
|
};
|
|
852
1068
|
|
|
853
|
-
Viewer.prototype.
|
|
854
|
-
|
|
1069
|
+
Viewer.prototype.setToolbarTitle = function(value) {
|
|
1070
|
+
this.setProperty("toolbarTitle", value, true);
|
|
1071
|
+
this._data.toolbar.title = value;
|
|
1072
|
+
this._model.updateBindings();
|
|
1073
|
+
return this;
|
|
855
1074
|
};
|
|
856
1075
|
|
|
857
1076
|
Viewer.prototype.setEnableToolbar = function(value) {
|
|
858
1077
|
this.setProperty("enableToolbar", value, true);
|
|
859
|
-
this.
|
|
1078
|
+
this._data.toolbar.enabled = value;
|
|
1079
|
+
this._model.updateBindings();
|
|
860
1080
|
return this;
|
|
861
1081
|
};
|
|
862
1082
|
|
|
863
1083
|
Viewer.prototype.setShowDrawerToolbar = function(value) {
|
|
864
1084
|
this.setProperty("showDrawerToolbar", value, true);
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
}
|
|
1085
|
+
this._data.drawerToolbar.visible = value;
|
|
1086
|
+
this._model.updateBindings();
|
|
868
1087
|
return this;
|
|
869
1088
|
};
|
|
870
1089
|
|
|
871
|
-
Viewer.prototype.
|
|
872
|
-
this.setProperty("
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
}
|
|
1090
|
+
Viewer.prototype.setHotspotsEnabled = function(value) {
|
|
1091
|
+
this.setProperty("hotspotsEnabled", value, true);
|
|
1092
|
+
this._data.hotspots.enabled = value;
|
|
1093
|
+
this._model.updateBindings();
|
|
876
1094
|
return this;
|
|
877
1095
|
};
|
|
878
1096
|
|
|
879
|
-
Viewer.prototype.
|
|
880
|
-
this.setProperty("
|
|
881
|
-
this.
|
|
1097
|
+
Viewer.prototype.setShowAllHotspots = function(value) {
|
|
1098
|
+
this.setProperty("showAllHotspots", value, true);
|
|
1099
|
+
this._data.hotspots.showAll = value;
|
|
1100
|
+
this._model.updateBindings();
|
|
882
1101
|
return this;
|
|
883
1102
|
};
|
|
884
1103
|
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
const viewerDomRef = this.getDomRef();
|
|
892
|
-
if (document.fullscreenElement === viewerDomRef) {
|
|
893
|
-
document.exitFullscreen();
|
|
894
|
-
} else {
|
|
895
|
-
viewerDomRef.requestFullscreen();
|
|
896
|
-
}
|
|
897
|
-
|
|
1104
|
+
Viewer.prototype._setHotspotColor = function(colorABGR, colorCSS) {
|
|
1105
|
+
this.setProperty("hotspotColorABGR", colorABGR, true);
|
|
1106
|
+
this.setProperty("hotspotColor", colorCSS, true);
|
|
1107
|
+
this._data.hotspots.colorABGR = colorABGR;
|
|
1108
|
+
this._data.hotspots.color = colorCSS;
|
|
1109
|
+
this._model.updateBindings();
|
|
898
1110
|
return this;
|
|
899
1111
|
};
|
|
900
1112
|
|
|
901
|
-
Viewer.prototype.
|
|
902
|
-
|
|
903
|
-
return vp ? vp.getShowAllHotspots() : this.getProperty("showAllHotspots");
|
|
1113
|
+
Viewer.prototype.setHotspotColorABGR = function(colorABGR) {
|
|
1114
|
+
return this._setHotspotColor(colorABGR, colorToCSSColor(abgrToColor(colorABGR)));
|
|
904
1115
|
};
|
|
905
1116
|
|
|
906
|
-
Viewer.prototype.
|
|
907
|
-
this.
|
|
908
|
-
var vp = this.getViewport().getImplementation();
|
|
909
|
-
if (vp) {
|
|
910
|
-
vp.setShowAllHotspots(value);
|
|
911
|
-
}
|
|
912
|
-
return this;
|
|
1117
|
+
Viewer.prototype.setHotspotColor = function(colorCSS) {
|
|
1118
|
+
return this._setHotspotColor(colorToABGR(cssColorToColor(colorCSS)), colorCSS);
|
|
913
1119
|
};
|
|
914
1120
|
|
|
915
|
-
Viewer.prototype.
|
|
916
|
-
|
|
917
|
-
|
|
1121
|
+
Viewer.prototype.setShouldTrackVisibilityChanges = function(value) {
|
|
1122
|
+
this.setProperty("shouldTrackVisibilityChanges", value, true);
|
|
1123
|
+
this._data.shouldTrackVisibilityChanges = value;
|
|
1124
|
+
this._model.updateBindings();
|
|
1125
|
+
return this;
|
|
918
1126
|
};
|
|
919
1127
|
|
|
920
|
-
Viewer.prototype.
|
|
921
|
-
this.setProperty("
|
|
922
|
-
this.
|
|
923
|
-
|
|
924
|
-
if (vp) {
|
|
925
|
-
vp.setHotspotColorABGR(value);
|
|
926
|
-
}
|
|
1128
|
+
Viewer.prototype.setRecursiveSelection = function(value) {
|
|
1129
|
+
this.setProperty("recursiveSelection", value, true);
|
|
1130
|
+
this._data.recursiveSelection = value;
|
|
1131
|
+
this._model.updateBindings();
|
|
927
1132
|
return this;
|
|
928
1133
|
};
|
|
929
1134
|
|
|
930
|
-
Viewer.prototype.
|
|
931
|
-
|
|
932
|
-
|
|
1135
|
+
Viewer.prototype.setEnableNotifications = function(oProperty) {
|
|
1136
|
+
this.setProperty("enableNotifications", oProperty, true);
|
|
1137
|
+
this._messagePopover.setVisible(false);
|
|
1138
|
+
this._updateLayout();
|
|
1139
|
+
return this;
|
|
933
1140
|
};
|
|
934
1141
|
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
1142
|
+
/**
|
|
1143
|
+
* It activates or deactivates full screen mode.
|
|
1144
|
+
* @returns {this} <code>this</code> to allow method chaining.
|
|
1145
|
+
* @public
|
|
1146
|
+
*/
|
|
1147
|
+
Viewer.prototype.activateFullScreenMode = function() {
|
|
1148
|
+
const viewerDomRef = this.getDomRef();
|
|
1149
|
+
if (document.fullscreenElement === viewerDomRef) {
|
|
1150
|
+
document.exitFullscreen();
|
|
1151
|
+
} else {
|
|
1152
|
+
viewerDomRef.requestFullscreen();
|
|
941
1153
|
}
|
|
1154
|
+
|
|
942
1155
|
return this;
|
|
943
1156
|
};
|
|
944
1157
|
|
|
@@ -1009,61 +1222,34 @@ sap.ui.define([
|
|
|
1009
1222
|
}
|
|
1010
1223
|
};
|
|
1011
1224
|
|
|
1012
|
-
Viewer.prototype.
|
|
1013
|
-
if (
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
if (this._splitter.indexOfContentArea(
|
|
1017
|
-
this._splitter.insertContentArea(this.
|
|
1225
|
+
Viewer.prototype._setSplitterContent = function(control, visible, rightSide) {
|
|
1226
|
+
if (control) {
|
|
1227
|
+
control.setVisible(visible);
|
|
1228
|
+
if (visible) {
|
|
1229
|
+
if (this._splitter.indexOfContentArea(control) < 0) {
|
|
1230
|
+
this._splitter.insertContentArea(control, rightSide ? this._splitter.getContentAreas().length : 0);
|
|
1018
1231
|
}
|
|
1019
|
-
} else {
|
|
1020
|
-
|
|
1021
|
-
this._splitter.removeContentArea(this._sceneTree);
|
|
1022
|
-
}
|
|
1023
|
-
this._sceneTree.setVisible(false);
|
|
1232
|
+
} else if (this._splitter.indexOfContentArea(control) >= 0) {
|
|
1233
|
+
this._splitter.removeContentArea(control);
|
|
1024
1234
|
}
|
|
1025
1235
|
}
|
|
1236
|
+
};
|
|
1026
1237
|
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
if (this._toolbar) {
|
|
1036
|
-
this._toolbar.refresh();
|
|
1037
|
-
}
|
|
1238
|
+
Viewer.prototype._updateLayout = function() {
|
|
1239
|
+
const data = this._data;
|
|
1240
|
+
this._setSplitterContent(this._sceneTree, data.sceneTree.visible && data.sceneTree.enabled);
|
|
1241
|
+
this._setSplitterContent(this._layersPanel, data.layersPanel.visible && data.layersPanel.enabled);
|
|
1242
|
+
this._setSplitterContent(this._elementsPanel, data.elementsPanel.visible && data.elementsPanel.enabled, true);
|
|
1243
|
+
this._setSplitterContent(this._pageGallery, data.pageGallery.visible && data.pageGallery.enabled);
|
|
1038
1244
|
|
|
1039
|
-
|
|
1040
|
-
this._viewport.getImplementation().getMiniMap()[this.getShowMiniMap() ? "open" : "close"]();
|
|
1041
|
-
}
|
|
1042
|
-
};
|
|
1245
|
+
this._messagePopover?.setVisible(this.getEnableNotifications() && this._messagePopover.getAggregation("_messagePopover").getItems().length > 0);
|
|
1043
1246
|
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
this._sceneTree = new SceneTree({
|
|
1047
|
-
layoutData: new SplitterLayoutData({
|
|
1048
|
-
size: "320px",
|
|
1049
|
-
minSize: 200
|
|
1050
|
-
}),
|
|
1051
|
-
viewStateManager: this._viewStateManager,
|
|
1052
|
-
contentConnector: this._contentConnector
|
|
1053
|
-
});
|
|
1247
|
+
if (data.miniMap.supported && this._viewport?.getImplementation()?.getMetadata().getName() === "sap.ui.vk.svg.Viewport") {
|
|
1248
|
+
this._viewport.getImplementation().getMiniMap()[data.miniMap.visible && data.miniMap.enabled ? "open" : "close"]();
|
|
1054
1249
|
}
|
|
1055
|
-
return this;
|
|
1056
1250
|
};
|
|
1057
1251
|
|
|
1058
1252
|
Viewer.prototype._instantiateStepNavigation = function() {
|
|
1059
|
-
if (this._stepNavigation) {
|
|
1060
|
-
this._layout.removeItem(this._stepNavigation);
|
|
1061
|
-
this._viewport.removeContent(this._stepNavigation);
|
|
1062
|
-
this._splitter.detachResize(this._handleSplitterResize, this);
|
|
1063
|
-
this._stepNavigation.destroy();
|
|
1064
|
-
this._stepNavigation = null;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
1253
|
var className = this._mainScene.getMetadata().getName();
|
|
1068
1254
|
|
|
1069
1255
|
/**
|
|
@@ -1072,6 +1258,7 @@ sap.ui.define([
|
|
|
1072
1258
|
*/
|
|
1073
1259
|
if (className === "sap.ui.vk.dvl.Scene") {
|
|
1074
1260
|
this._stepNavigation = new StepNavigation({
|
|
1261
|
+
visible: "{_internal>/stepNavigation/visible}",
|
|
1075
1262
|
showThumbnails: this.getShowStepNavigationThumbnails(),
|
|
1076
1263
|
contentConnector: this._contentConnector
|
|
1077
1264
|
});
|
|
@@ -1080,41 +1267,29 @@ sap.ui.define([
|
|
|
1080
1267
|
|
|
1081
1268
|
if (this._stepNavigation == null && (className === "sap.ui.vk.threejs.Scene" || className === "sap.ui.vk.svg.Scene")) {
|
|
1082
1269
|
this._stepNavigation = new ViewGallery({
|
|
1270
|
+
visible: "{_internal>/stepNavigation/visible}",
|
|
1083
1271
|
host: this.getViewport(),
|
|
1084
1272
|
contentConnector: this._contentConnector,
|
|
1085
|
-
viewManager: this._viewManager
|
|
1273
|
+
viewManager: this._viewManager,
|
|
1274
|
+
animationPlayer: this._animationPlayer
|
|
1086
1275
|
});
|
|
1087
1276
|
if (!this.getOverlayStepNavigation()) {
|
|
1088
1277
|
this._layout.insertItem(this._stepNavigation, 3);
|
|
1089
1278
|
} else {
|
|
1090
1279
|
this._stepNavigation.addStyleClass("sapVizKitViewGallery");
|
|
1091
1280
|
this._viewport.addContent(this._stepNavigation);
|
|
1092
|
-
this._splitter.attachResize(this._handleSplitterResize, this);
|
|
1093
1281
|
}
|
|
1094
|
-
this._stepNavigation.setAnimationPlayer(this._animationPlayer);
|
|
1095
1282
|
}
|
|
1096
1283
|
|
|
1097
1284
|
return this;
|
|
1098
1285
|
};
|
|
1099
1286
|
|
|
1100
|
-
Viewer.prototype._handleSplitterResize = function() {
|
|
1101
|
-
this._stepNavigation.resizeToolbarSpacer();
|
|
1102
|
-
};
|
|
1103
|
-
|
|
1104
1287
|
Viewer.prototype._showViewport = function() {
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
vp.setHotspotColor(this.getProperty("hotspotColor"));
|
|
1108
|
-
vp.setHotspotColorABGR(this.getProperty("hotspotColorABGR"));
|
|
1109
|
-
vp.setShowAllHotspots(this.getProperty("showAllHotspots"));
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
if (this._nativeViewport) {
|
|
1113
|
-
this._nativeViewport.setVisible(false);
|
|
1114
|
-
}
|
|
1288
|
+
const viewport = this.getViewport();
|
|
1289
|
+
this._nativeViewport?.setVisible(false);
|
|
1115
1290
|
this._stackedViewport.removeAllContent();
|
|
1116
|
-
this._stackedViewport.addContent(
|
|
1117
|
-
|
|
1291
|
+
this._stackedViewport.addContent(viewport);
|
|
1292
|
+
viewport.setVisible(true);
|
|
1118
1293
|
|
|
1119
1294
|
return this;
|
|
1120
1295
|
};
|
|
@@ -1127,9 +1302,7 @@ sap.ui.define([
|
|
|
1127
1302
|
});
|
|
1128
1303
|
}
|
|
1129
1304
|
|
|
1130
|
-
|
|
1131
|
-
this._viewport.setVisible(false);
|
|
1132
|
-
}
|
|
1305
|
+
this._viewport?.setVisible(false);
|
|
1133
1306
|
this._stackedViewport.removeAllContent();
|
|
1134
1307
|
this._stackedViewport.addContent(this._nativeViewport);
|
|
1135
1308
|
this._nativeViewport.setVisible(true);
|
|
@@ -1301,12 +1474,6 @@ sap.ui.define([
|
|
|
1301
1474
|
return this;
|
|
1302
1475
|
};
|
|
1303
1476
|
|
|
1304
|
-
Viewer.prototype._onViewportViewActivated = function(event) {
|
|
1305
|
-
// If it's 3D content, we mark the scene tree as 'usable'.
|
|
1306
|
-
// In case of 2D, the scene tree should not be enabled.
|
|
1307
|
-
this._componentsState.sceneTree.shouldBeEnabled = event.getParameter("type") === "3D";
|
|
1308
|
-
};
|
|
1309
|
-
|
|
1310
1477
|
Viewer.prototype._removeProgressIndicator = function() {
|
|
1311
1478
|
this._progressIndicator.setVisible(false);
|
|
1312
1479
|
this._progressIndicator.setDisplayValue("");
|
|
@@ -1317,7 +1484,7 @@ sap.ui.define([
|
|
|
1317
1484
|
Viewer.prototype._handleContentReplaced = function(event) {
|
|
1318
1485
|
var content = event.getParameter("newContent");
|
|
1319
1486
|
|
|
1320
|
-
if (content instanceof Scene || content instanceof HTMLImageElement || content instanceof HTMLObjectElement) {
|
|
1487
|
+
if (content instanceof Scene || content instanceof HTMLImageElement || content instanceof HTMLObjectElement || content?.isA?.("sap.ui.vk.pdf.Document")) {
|
|
1321
1488
|
this._showViewport();
|
|
1322
1489
|
|
|
1323
1490
|
// each time we load a 3D mode, we have to update the panning ratio of the redline control
|
|
@@ -1340,7 +1507,7 @@ sap.ui.define([
|
|
|
1340
1507
|
|
|
1341
1508
|
Viewer.prototype._handleContentChangesStarted = function(event) {
|
|
1342
1509
|
this.setBusy(true);
|
|
1343
|
-
if (this.
|
|
1510
|
+
if (this.getEnableProgressIndicator()) {
|
|
1344
1511
|
this._progressIndicator.setPercentValue(0.0);
|
|
1345
1512
|
this._progressIndicator.setVisible(true);
|
|
1346
1513
|
this._progressIndicator.rerender();
|
|
@@ -1352,6 +1519,13 @@ sap.ui.define([
|
|
|
1352
1519
|
this.setBusy(false);
|
|
1353
1520
|
var content = event.getParameter("content");
|
|
1354
1521
|
if (content) {
|
|
1522
|
+
if (this._pageGallery) {
|
|
1523
|
+
const viewportImplementation = this._viewport.getImplementation();
|
|
1524
|
+
if (viewportImplementation?.getMetadata().getName() === "sap.ui.vk.pdf.Viewport") {
|
|
1525
|
+
viewportImplementation.bindProperty("currentPageIndex", "_internal>/pageGallery/currentPageIndex");
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1355
1529
|
this.fireSceneLoadingSucceeded({
|
|
1356
1530
|
scene: content
|
|
1357
1531
|
});
|