@sapui5/sap.ui.vk 1.135.0 → 1.138.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 +1 -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 +2 -2
- package/src/sap/ui/vk/ContentManager.js +1 -1
- package/src/sap/ui/vk/ContentResource.js +13 -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 +142 -76
- 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 +12 -1
- package/src/sap/ui/vk/SceneTree.js +4 -7
- 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 +69 -115
- 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 +2 -2
- package/src/sap/ui/vk/ViewStateManagerBase.js +3 -3
- package/src/sap/ui/vk/Viewer.js +467 -304
- package/src/sap/ui/vk/Viewport.js +2 -2
- package/src/sap/ui/vk/ViewportBase.js +46 -3
- package/src/sap/ui/vk/VisibilityMode.js +2 -1
- 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 +991 -0
- package/src/sap/ui/vk/ecad/LayersPanel.js +573 -0
- package/src/sap/ui/vk/ecad/VisibilityType.js +31 -0
- package/src/sap/ui/vk/i18n/messagebundle.properties +85 -0
- package/src/sap/ui/vk/i18n/messagebundle_ar.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_bg.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_ca.properties +35 -1
- package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_cs.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_cy.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_da.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_de.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_el.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_en.properties +348 -0
- package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_es.properties +36 -2
- package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_et.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_fi.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_fr.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_hi.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_hr.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_hu.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_id.properties +35 -1
- package/src/sap/ui/vk/i18n/messagebundle_it.properties +36 -2
- package/src/sap/ui/vk/i18n/messagebundle_iw.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_ja.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_kk.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_ko.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_lt.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_lv.properties +36 -2
- package/src/sap/ui/vk/i18n/messagebundle_mk.properties +36 -2
- package/src/sap/ui/vk/i18n/messagebundle_ms.properties +39 -5
- package/src/sap/ui/vk/i18n/messagebundle_nl.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_no.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_pl.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_pt.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_ro.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_ru.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_sh.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_sk.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_sl.properties +37 -3
- package/src/sap/ui/vk/i18n/messagebundle_sr.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_sv.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_th.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_tr.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_uk.properties +35 -1
- package/src/sap/ui/vk/i18n/messagebundle_vi.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +34 -0
- package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +34 -0
- package/src/sap/ui/vk/library.js +7 -3
- 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/PageGallery.js +3 -5
- 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 +2 -1
- package/src/sap/ui/vk/svg/ContentManager.js +4 -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 +199 -2
- package/src/sap/ui/vk/themes/base/DrawerToolbar.less +8 -0
- package/src/sap/ui/vk/themes/base/Viewer.less +9 -12
- 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/Viewer.less +1 -12
- package/src/sap/ui/vk/themes/sap_belize_base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_bluecrystal_base/Viewer.less +1 -12
- package/src/sap/ui/vk/themes/sap_bluecrystal_base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_hcb/base_Viewer.less +1 -12
- 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 +1 -1
- package/src/sap/ui/vk/threejs/Callout.js +11 -1
- package/src/sap/ui/vk/threejs/ContentDeliveryService.js +2 -1
- package/src/sap/ui/vk/threejs/ContentManager.js +2 -1
- package/src/sap/ui/vk/threejs/DetailView.js +1 -1
- package/src/sap/ui/vk/threejs/HighlightPlayer.js +1 -1
- 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 +1 -1
- package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
- 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 -1
- package/src/sap/ui/vk/threejs/SceneBuilder.js +18 -2
- package/src/sap/ui/vk/threejs/Texture.js +2 -2
- package/src/sap/ui/vk/threejs/ThreeExtensions.js +9 -1
- package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
- package/src/sap/ui/vk/threejs/ViewStateManager.js +2 -2
- package/src/sap/ui/vk/threejs/Viewport.js +9 -3
- package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +1 -1
- 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/TransformSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/totara/TotaraLoader.js +4 -0
- package/src/sap/ui/vk/totara/TotaraUtils.js +5 -0
- package/src/sap/ui/vk/ve/dvl.js +1 -1
- package/src/sap/ui/vk/ve/dvl.wasm +0 -0
- package/src/sap/ui/vk/ve/matai.js +1 -1
- package/src/sap/ui/vk/ve/matai.wasm +0 -0
- package/src/sap/ui/vk/ToolbarRenderer.js +0 -41
- package/src/sap/ui/vk/ViewerRenderer.js +0 -48
- 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/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,20 +34,24 @@ 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",
|
|
42
45
|
"./abgrToColor",
|
|
43
46
|
"./colorToABGR",
|
|
44
47
|
"sap/base/Log",
|
|
45
|
-
"sap/base/i18n/Localization"
|
|
48
|
+
"sap/base/i18n/Localization",
|
|
49
|
+
"sap/ui/core/StaticArea"
|
|
46
50
|
], function(
|
|
47
51
|
vkLibrary,
|
|
48
52
|
core,
|
|
49
53
|
Control,
|
|
54
|
+
JSONModel,
|
|
50
55
|
Scene,
|
|
51
56
|
ContentResource,
|
|
52
57
|
ContentConnector,
|
|
@@ -70,16 +75,19 @@ sap.ui.define([
|
|
|
70
75
|
Viewport,
|
|
71
76
|
NativeViewport,
|
|
72
77
|
RedlineDesign,
|
|
73
|
-
ViewerRenderer,
|
|
74
78
|
SelectionMode,
|
|
75
79
|
DrawerToolbar,
|
|
80
|
+
PageGallery,
|
|
81
|
+
LayersPanel,
|
|
82
|
+
ElementsPanel,
|
|
76
83
|
getResourceBundle,
|
|
77
84
|
cssColorToColor,
|
|
78
85
|
colorToCSSColor,
|
|
79
86
|
abgrToColor,
|
|
80
87
|
colorToABGR,
|
|
81
88
|
Log,
|
|
82
|
-
Localization
|
|
89
|
+
Localization,
|
|
90
|
+
StaticArea
|
|
83
91
|
) {
|
|
84
92
|
"use strict";
|
|
85
93
|
|
|
@@ -91,7 +99,7 @@ sap.ui.define([
|
|
|
91
99
|
* @param {object} [mSettings] initial settings for the new Viewer control
|
|
92
100
|
* @public
|
|
93
101
|
* @author SAP SE
|
|
94
|
-
* @version 1.
|
|
102
|
+
* @version 1.138.0
|
|
95
103
|
* @since 1.32.0
|
|
96
104
|
* @extends sap.ui.core.Control
|
|
97
105
|
* @alias sap.ui.vk.Viewer
|
|
@@ -150,6 +158,48 @@ sap.ui.define([
|
|
|
150
158
|
type: "boolean",
|
|
151
159
|
defaultValue: false
|
|
152
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
|
+
},
|
|
153
203
|
/**
|
|
154
204
|
* Shows or hides Toolbar control
|
|
155
205
|
*/
|
|
@@ -254,6 +304,13 @@ sap.ui.define([
|
|
|
254
304
|
premultipliedAlpha: false
|
|
255
305
|
}
|
|
256
306
|
},
|
|
307
|
+
/**
|
|
308
|
+
* Shows or hides showing of all hotspots toggle button
|
|
309
|
+
*/
|
|
310
|
+
hotspotsEnabled: {
|
|
311
|
+
type: "boolean",
|
|
312
|
+
defaultValue: true
|
|
313
|
+
},
|
|
257
314
|
/**
|
|
258
315
|
* Enables or disables showing of all hotspots
|
|
259
316
|
*/
|
|
@@ -266,14 +323,14 @@ sap.ui.define([
|
|
|
266
323
|
*/
|
|
267
324
|
hotspotColorABGR: {
|
|
268
325
|
type: "int",
|
|
269
|
-
defaultValue:
|
|
326
|
+
defaultValue: 0x590000BB
|
|
270
327
|
},
|
|
271
328
|
/**
|
|
272
329
|
* Color used for highlighting Smart2D hotspots in the CSS Color format.
|
|
273
330
|
*/
|
|
274
331
|
hotspotColor: {
|
|
275
332
|
type: "sap.ui.core.CSSColor",
|
|
276
|
-
defaultValue: "rgba(
|
|
333
|
+
defaultValue: "rgba(89, 0, 0, 0.73)"
|
|
277
334
|
}
|
|
278
335
|
},
|
|
279
336
|
|
|
@@ -437,6 +494,79 @@ sap.ui.define([
|
|
|
437
494
|
}
|
|
438
495
|
}
|
|
439
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
|
+
});
|
|
440
570
|
}
|
|
441
571
|
});
|
|
442
572
|
|
|
@@ -444,41 +574,6 @@ sap.ui.define([
|
|
|
444
574
|
this._inApplySettings = true;
|
|
445
575
|
Control.prototype.applySettings.apply(this, arguments);
|
|
446
576
|
delete this._inApplySettings;
|
|
447
|
-
|
|
448
|
-
if (this._viewStateManager) {
|
|
449
|
-
this._viewStateManager.setShouldTrackVisibilityChanges(this.getShouldTrackVisibilityChanges());
|
|
450
|
-
this._viewStateManager.setRecursiveSelection(this.getRecursiveSelection());
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
// _componentsState stores the default state of the scene tree and step navigation.
|
|
454
|
-
// It also stores the last user interaction such as show/hide.
|
|
455
|
-
// These settings are used to restore states after switching between 2D and 3D.
|
|
456
|
-
this._componentsState = {
|
|
457
|
-
sceneTree: {
|
|
458
|
-
defaultEnable: this.getEnableSceneTree(),
|
|
459
|
-
// shouldBeEnabled refers to certain scenarios when the scene tree should not be displayed (for example Smart2D files)
|
|
460
|
-
shouldBeEnabled: true,
|
|
461
|
-
// saving the last state set by user interaction (turn scene tree ON/OFF)
|
|
462
|
-
userInteractionShow: this.getShowSceneTree()
|
|
463
|
-
},
|
|
464
|
-
stepNavigation: {
|
|
465
|
-
defaultEnable: this.getEnableStepNavigation(),
|
|
466
|
-
userInteractionShow: this.getShowStepNavigation()
|
|
467
|
-
},
|
|
468
|
-
miniMap: {
|
|
469
|
-
defaultEnable: this.getEnableMiniMap(),
|
|
470
|
-
userInteractionShow: this.getShowMiniMap()
|
|
471
|
-
},
|
|
472
|
-
progressIndicator: {
|
|
473
|
-
defaultEnable: this.getEnableProgressIndicator()
|
|
474
|
-
},
|
|
475
|
-
messagePopover: {
|
|
476
|
-
defaultEnable: this.getEnableNotifications()
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
// We initialize the viewer with the both scene tree and step navigation disabled.
|
|
480
|
-
this.setEnableSceneTree(false);
|
|
481
|
-
this.setEnableStepNavigation(false);
|
|
482
577
|
};
|
|
483
578
|
|
|
484
579
|
Viewer.prototype.init = function() {
|
|
@@ -493,7 +588,38 @@ sap.ui.define([
|
|
|
493
588
|
this._contentConnector.attachContentChangesFinished(this._handleContentChangesFinished, this);
|
|
494
589
|
this._contentConnector.attachContentChangesProgress(this._handleContentChangesProgress, this);
|
|
495
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
|
+
|
|
496
620
|
this._viewStateManager = new ViewStateManager(this.getId() + "-viewstatemanager", {
|
|
621
|
+
shouldTrackVisibilityChanges: "{_internal>/shouldTrackVisibilityChanges}",
|
|
622
|
+
recursiveSelection: "{_internal>/recursiveSelection}",
|
|
497
623
|
contentConnector: this._contentConnector
|
|
498
624
|
});
|
|
499
625
|
this.setAggregation("viewStateManager", this._viewStateManager);
|
|
@@ -519,10 +645,18 @@ sap.ui.define([
|
|
|
519
645
|
this._stepNavigation = null;
|
|
520
646
|
this._sceneTree = null;
|
|
521
647
|
this._drawerToolbar = null;
|
|
648
|
+
this._pageGallery = null;
|
|
649
|
+
this._layersPanel = null;
|
|
650
|
+
this._elementsPanel = null;
|
|
651
|
+
|
|
652
|
+
this._staticAreaParent = null;
|
|
653
|
+
this._staticAreaNextSibling = null;
|
|
654
|
+
|
|
655
|
+
this.attachBrowserEvent("fullscreenchange", this._handleFullscreenChange, this);
|
|
522
656
|
|
|
523
657
|
this._toolbar = new Toolbar({
|
|
524
|
-
title:
|
|
525
|
-
visible:
|
|
658
|
+
title: "{_internal>/toolbar/title}",
|
|
659
|
+
visible: "{_internal>/toolbar/enabled}",
|
|
526
660
|
viewer: this
|
|
527
661
|
});
|
|
528
662
|
|
|
@@ -582,16 +716,11 @@ sap.ui.define([
|
|
|
582
716
|
|
|
583
717
|
Localization.detachChange(this._onLocalizationChanged);
|
|
584
718
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
this._viewport.destroy();
|
|
588
|
-
this._viewport = null;
|
|
589
|
-
}
|
|
719
|
+
this._viewport?.destroy();
|
|
720
|
+
this._viewport = null;
|
|
590
721
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
this._nativeViewport = null;
|
|
594
|
-
}
|
|
722
|
+
this._nativeViewport?.destroy();
|
|
723
|
+
this._nativeViewport = null;
|
|
595
724
|
|
|
596
725
|
// All scenes will be destroyed and all viewports will be unregistered by GraphicsCore.destroy.
|
|
597
726
|
this._setMainScene(null);
|
|
@@ -604,47 +733,143 @@ sap.ui.define([
|
|
|
604
733
|
this._viewStateManager = null;
|
|
605
734
|
this._contentConnector = null;
|
|
606
735
|
this._viewManager = null;
|
|
736
|
+
this._model = null;
|
|
737
|
+
|
|
738
|
+
this._staticAreaParent = null;
|
|
739
|
+
this._staticAreaNextSibling = null;
|
|
740
|
+
|
|
741
|
+
this.detachBrowserEvent("fullscreenchange", this._handleFullscreenChange, this);
|
|
607
742
|
|
|
608
743
|
if (Control.prototype.exit) {
|
|
609
744
|
Control.prototype.exit.apply(this);
|
|
610
745
|
}
|
|
611
746
|
};
|
|
612
747
|
|
|
613
|
-
Viewer.prototype.
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
748
|
+
Viewer.prototype._handleFullscreenChange = function(event) {
|
|
749
|
+
const viewerDomRef = this.getDomRef();
|
|
750
|
+
|
|
751
|
+
// We can get to this event handler in two cases:
|
|
752
|
+
//
|
|
753
|
+
// 1. When the viewer itself enters or exits fullscreen mode.
|
|
754
|
+
// 2. When a child control of the viewer enters or exits fullscreen mode and the event is
|
|
755
|
+
// propagated from the child.
|
|
756
|
+
//
|
|
757
|
+
// NOTE 1: this._staticAreaParent != null only when the viewer is in fullscreen mode.
|
|
758
|
+
//
|
|
759
|
+
// NOTE 2: The event is propagated from the child control only when the user presses the
|
|
760
|
+
// "Esc" key to exit fullscreen mode and document.fullscreenElement == null.
|
|
761
|
+
//
|
|
762
|
+
// When NOTE 1 and NOTE 2 are true, we need to restore the static area to its original
|
|
763
|
+
// position in the DOM tree.
|
|
764
|
+
|
|
765
|
+
if (event.target === this.getDomRef() || this._staticAreaParent != null) {
|
|
766
|
+
const staticArea = StaticArea.getDomRef();
|
|
767
|
+
if (staticArea == null) {
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
770
|
+
if (document.fullscreenElement === this.getDomRef()) {
|
|
771
|
+
// Entering fullscreen
|
|
772
|
+
this._staticAreaParent = staticArea.parentElement;
|
|
773
|
+
this._staticAreaNextSibling = staticArea.nextSibling;
|
|
774
|
+
viewerDomRef.insertBefore(staticArea, viewerDomRef.firstChild);
|
|
775
|
+
this._toolbar._enterFullScreenButton.setTooltip(getResourceBundle().getText("EXIT_FULLSCREEN"));
|
|
776
|
+
|
|
777
|
+
// See NOTE 1 in ViewportBase#_handleFullscreenChange.
|
|
778
|
+
event.stopImmediatePropagation();
|
|
779
|
+
} else if (this._staticAreaParent != null) {
|
|
780
|
+
// Exiting fullscreen
|
|
781
|
+
this._staticAreaParent.insertBefore(staticArea, this._staticAreaNextSibling);
|
|
782
|
+
this._staticAreaParent = this._staticAreaNextSibling = null;
|
|
783
|
+
this._toolbar._enterFullScreenButton.setTooltip(getResourceBundle().getText("ENTER_FULLSCREEN"));
|
|
784
|
+
|
|
785
|
+
// See NOTE 2 in ViewportBase#_handleFullscreenChange.
|
|
786
|
+
if (document.fullscreenElement != null) {
|
|
787
|
+
event.stopImmediatePropagation();
|
|
631
788
|
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
};
|
|
632
792
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
793
|
+
Viewer.prototype._setMainScene = function(scene) {
|
|
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.getRootElement()?.children.some((child) => child.userData.sourceType === "ecad");
|
|
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
|
+
});
|
|
638
832
|
}
|
|
639
833
|
|
|
640
|
-
if (
|
|
641
|
-
this.
|
|
834
|
+
if (data.stepNavigation.supported && data.stepNavigation.enabled) {
|
|
835
|
+
this._instantiateStepNavigation();
|
|
836
|
+
}
|
|
837
|
+
|
|
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
|
+
});
|
|
642
858
|
}
|
|
643
|
-
} else {
|
|
644
|
-
this._mainScene = null;
|
|
645
|
-
this.setEnableSceneTree(false);
|
|
646
|
-
this.setEnableStepNavigation(false);
|
|
647
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
|
+
|
|
648
873
|
return this;
|
|
649
874
|
};
|
|
650
875
|
|
|
@@ -690,13 +915,14 @@ sap.ui.define([
|
|
|
690
915
|
this._viewport = new Viewport(this.getId() + "-viewport", {
|
|
691
916
|
viewStateManager: this._viewStateManager,
|
|
692
917
|
selectionMode: SelectionMode.Exclusive,
|
|
693
|
-
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}"
|
|
694
922
|
});
|
|
695
923
|
|
|
696
|
-
this._viewport.attachEvent("viewActivated", this._onViewportViewActivated, this);
|
|
697
|
-
|
|
698
924
|
this._drawerToolbar = new DrawerToolbar({
|
|
699
|
-
visible:
|
|
925
|
+
visible: "{_internal>/drawerToolbar/visible}",
|
|
700
926
|
expanded: true,
|
|
701
927
|
viewport: this._viewport
|
|
702
928
|
});
|
|
@@ -750,206 +976,182 @@ sap.ui.define([
|
|
|
750
976
|
return this._redlineDesign;
|
|
751
977
|
};
|
|
752
978
|
|
|
753
|
-
Viewer.prototype.setEnableSceneTree = function(
|
|
754
|
-
this.setProperty("enableSceneTree",
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
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();
|
|
758
990
|
this._updateLayout();
|
|
759
991
|
return this;
|
|
760
992
|
};
|
|
761
993
|
|
|
762
|
-
Viewer.prototype.
|
|
763
|
-
this.setProperty("
|
|
764
|
-
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();
|
|
765
1019
|
this._updateLayout();
|
|
766
1020
|
return this;
|
|
767
1021
|
};
|
|
768
1022
|
|
|
769
|
-
Viewer.prototype.
|
|
770
|
-
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();
|
|
771
1034
|
this._updateLayout();
|
|
772
1035
|
return this;
|
|
773
1036
|
};
|
|
774
1037
|
|
|
775
|
-
Viewer.prototype.
|
|
776
|
-
this.setProperty("
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
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();
|
|
780
1049
|
this._updateLayout();
|
|
781
1050
|
return this;
|
|
782
1051
|
};
|
|
783
1052
|
|
|
784
|
-
Viewer.prototype.
|
|
785
|
-
this.setProperty("
|
|
1053
|
+
Viewer.prototype.setEnableMiniMap = function(value) {
|
|
1054
|
+
this.setProperty("enableMiniMap", value, true);
|
|
1055
|
+
this._data.miniMap.enabled = value;
|
|
1056
|
+
this._model.updateBindings();
|
|
786
1057
|
this._updateLayout();
|
|
787
1058
|
return this;
|
|
788
1059
|
};
|
|
789
1060
|
|
|
790
|
-
Viewer.prototype.setShowMiniMap = function(
|
|
791
|
-
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();
|
|
792
1065
|
this._updateLayout();
|
|
793
1066
|
return this;
|
|
794
1067
|
};
|
|
795
1068
|
|
|
796
|
-
Viewer.prototype.
|
|
797
|
-
|
|
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;
|
|
798
1074
|
};
|
|
799
1075
|
|
|
800
1076
|
Viewer.prototype.setEnableToolbar = function(value) {
|
|
801
1077
|
this.setProperty("enableToolbar", value, true);
|
|
802
|
-
this.
|
|
1078
|
+
this._data.toolbar.enabled = value;
|
|
1079
|
+
this._model.updateBindings();
|
|
803
1080
|
return this;
|
|
804
1081
|
};
|
|
805
1082
|
|
|
806
1083
|
Viewer.prototype.setShowDrawerToolbar = function(value) {
|
|
807
1084
|
this.setProperty("showDrawerToolbar", value, true);
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
}
|
|
1085
|
+
this._data.drawerToolbar.visible = value;
|
|
1086
|
+
this._model.updateBindings();
|
|
811
1087
|
return this;
|
|
812
1088
|
};
|
|
813
1089
|
|
|
814
|
-
Viewer.prototype.
|
|
815
|
-
this.setProperty("
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
}
|
|
1090
|
+
Viewer.prototype.setHotspotsEnabled = function(value) {
|
|
1091
|
+
this.setProperty("hotspotsEnabled", value, true);
|
|
1092
|
+
this._data.hotspots.enabled = value;
|
|
1093
|
+
this._model.updateBindings();
|
|
819
1094
|
return this;
|
|
820
1095
|
};
|
|
821
1096
|
|
|
822
|
-
Viewer.prototype.
|
|
823
|
-
this.setProperty("
|
|
824
|
-
this.
|
|
1097
|
+
Viewer.prototype.setShowAllHotspots = function(value) {
|
|
1098
|
+
this.setProperty("showAllHotspots", value, true);
|
|
1099
|
+
this._data.hotspots.showAll = value;
|
|
1100
|
+
this._model.updateBindings();
|
|
825
1101
|
return this;
|
|
826
1102
|
};
|
|
827
1103
|
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
Viewer.prototype.activateFullScreenMode = function(value) {
|
|
835
|
-
// It checks if the current document is in full screen mode
|
|
836
|
-
var isInFullScreenMode = function(document) {
|
|
837
|
-
return !!(document.fullScreen || document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement);
|
|
838
|
-
};
|
|
839
|
-
|
|
840
|
-
// Fullscreen toggle
|
|
841
|
-
if (value) {
|
|
842
|
-
if (!isInFullScreenMode(document)) {
|
|
843
|
-
if (!this._fullScreenHandler) {
|
|
844
|
-
var that = this;
|
|
845
|
-
this._fullScreenHandler = function(event) {
|
|
846
|
-
var isFullScreen = isInFullScreenMode(document);
|
|
847
|
-
if (!isFullScreen) {
|
|
848
|
-
that.removeStyleClass("sapVizKitViewerFullScreen");
|
|
849
|
-
|
|
850
|
-
document.removeEventListener("fullscreenchange", that._fullScreenHandler);
|
|
851
|
-
document.removeEventListener("mozfullscreenchange", that._fullScreenHandler);
|
|
852
|
-
document.removeEventListener("webkitfullscreenchange", that._fullScreenHandler);
|
|
853
|
-
document.removeEventListener("MSFullscreenChange", that._fullScreenHandler);
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
that.fireFullScreen({
|
|
857
|
-
isFullScreen: isFullScreen
|
|
858
|
-
});
|
|
859
|
-
};
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
// find the active viewer element to set to full screen
|
|
863
|
-
var viewerElements = document.getElementsByClassName("sapVizKitViewer");
|
|
864
|
-
// when viewport not loaded, activate full screen on the body element
|
|
865
|
-
var bodyElement = document.getElementsByTagName("body")[0];
|
|
866
|
-
if (viewerElements.length) {
|
|
867
|
-
var vpElement = this.getViewport().getDomRef();
|
|
868
|
-
for (var i = 0; i < viewerElements.length; ++i) {
|
|
869
|
-
if (viewerElements[i].contains(vpElement)) {
|
|
870
|
-
bodyElement = viewerElements[i];
|
|
871
|
-
break;
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
} else {
|
|
875
|
-
return this;
|
|
876
|
-
}
|
|
877
|
-
if (bodyElement.requestFullScreen) {
|
|
878
|
-
document.addEventListener("fullscreenchange", this._fullScreenHandler);
|
|
879
|
-
bodyElement.requestFullScreen();
|
|
880
|
-
} else if (bodyElement.webkitRequestFullScreen) {
|
|
881
|
-
document.addEventListener("webkitfullscreenchange", this._fullScreenHandler);
|
|
882
|
-
bodyElement.webkitRequestFullScreen();
|
|
883
|
-
} else if (bodyElement.mozRequestFullScreen) {
|
|
884
|
-
document.addEventListener("mozfullscreenchange", this._fullScreenHandler);
|
|
885
|
-
bodyElement.mozRequestFullScreen();
|
|
886
|
-
} else if (bodyElement.msRequestFullscreen) {
|
|
887
|
-
document.addEventListener("MSFullscreenChange", this._fullScreenHandler);
|
|
888
|
-
bodyElement.msRequestFullscreen();
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
this.addStyleClass("sapVizKitViewerFullScreen");
|
|
893
|
-
} else {
|
|
894
|
-
if (isInFullScreenMode(document)) {
|
|
895
|
-
if (document.cancelFullScreen) {
|
|
896
|
-
document.cancelFullScreen();
|
|
897
|
-
} else if (document.webkitCancelFullScreen) {
|
|
898
|
-
document.webkitCancelFullScreen();
|
|
899
|
-
} else if (document.mozCancelFullScreen) {
|
|
900
|
-
document.mozCancelFullScreen();
|
|
901
|
-
} else if (document.msExitFullscreen) {
|
|
902
|
-
document.msExitFullscreen();
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
this.removeStyleClass("sapVizKitViewerFullScreen");
|
|
907
|
-
}
|
|
908
|
-
|
|
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();
|
|
909
1110
|
return this;
|
|
910
1111
|
};
|
|
911
1112
|
|
|
912
|
-
Viewer.prototype.
|
|
913
|
-
|
|
914
|
-
return vp ? vp.getShowAllHotspots() : this.getProperty("showAllHotspots");
|
|
1113
|
+
Viewer.prototype.setHotspotColorABGR = function(colorABGR) {
|
|
1114
|
+
return this._setHotspotColor(colorABGR, colorToCSSColor(abgrToColor(colorABGR)));
|
|
915
1115
|
};
|
|
916
1116
|
|
|
917
|
-
Viewer.prototype.
|
|
918
|
-
this.
|
|
919
|
-
var vp = this.getViewport().getImplementation();
|
|
920
|
-
if (vp) {
|
|
921
|
-
vp.setShowAllHotspots(value);
|
|
922
|
-
}
|
|
923
|
-
return this;
|
|
1117
|
+
Viewer.prototype.setHotspotColor = function(colorCSS) {
|
|
1118
|
+
return this._setHotspotColor(colorToABGR(cssColorToColor(colorCSS)), colorCSS);
|
|
924
1119
|
};
|
|
925
1120
|
|
|
926
|
-
Viewer.prototype.
|
|
927
|
-
|
|
928
|
-
|
|
1121
|
+
Viewer.prototype.setShouldTrackVisibilityChanges = function(value) {
|
|
1122
|
+
this.setProperty("shouldTrackVisibilityChanges", value, true);
|
|
1123
|
+
this._data.shouldTrackVisibilityChanges = value;
|
|
1124
|
+
this._model.updateBindings();
|
|
1125
|
+
return this;
|
|
929
1126
|
};
|
|
930
1127
|
|
|
931
|
-
Viewer.prototype.
|
|
932
|
-
this.setProperty("
|
|
933
|
-
this.
|
|
934
|
-
|
|
935
|
-
if (vp) {
|
|
936
|
-
vp.setHotspotColorABGR(value);
|
|
937
|
-
}
|
|
1128
|
+
Viewer.prototype.setRecursiveSelection = function(value) {
|
|
1129
|
+
this.setProperty("recursiveSelection", value, true);
|
|
1130
|
+
this._data.recursiveSelection = value;
|
|
1131
|
+
this._model.updateBindings();
|
|
938
1132
|
return this;
|
|
939
1133
|
};
|
|
940
1134
|
|
|
941
|
-
Viewer.prototype.
|
|
942
|
-
|
|
943
|
-
|
|
1135
|
+
Viewer.prototype.setEnableNotifications = function(oProperty) {
|
|
1136
|
+
this.setProperty("enableNotifications", oProperty, true);
|
|
1137
|
+
this._messagePopover.setVisible(false);
|
|
1138
|
+
this._updateLayout();
|
|
1139
|
+
return this;
|
|
944
1140
|
};
|
|
945
1141
|
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
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();
|
|
952
1153
|
}
|
|
1154
|
+
|
|
953
1155
|
return this;
|
|
954
1156
|
};
|
|
955
1157
|
|
|
@@ -1020,61 +1222,34 @@ sap.ui.define([
|
|
|
1020
1222
|
}
|
|
1021
1223
|
};
|
|
1022
1224
|
|
|
1023
|
-
Viewer.prototype.
|
|
1024
|
-
if (
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
if (this._splitter.indexOfContentArea(
|
|
1028
|
-
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);
|
|
1029
1231
|
}
|
|
1030
|
-
} else {
|
|
1031
|
-
|
|
1032
|
-
this._splitter.removeContentArea(this._sceneTree);
|
|
1033
|
-
}
|
|
1034
|
-
this._sceneTree.setVisible(false);
|
|
1232
|
+
} else if (this._splitter.indexOfContentArea(control) >= 0) {
|
|
1233
|
+
this._splitter.removeContentArea(control);
|
|
1035
1234
|
}
|
|
1036
1235
|
}
|
|
1236
|
+
};
|
|
1037
1237
|
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
if (this._toolbar) {
|
|
1047
|
-
this._toolbar.refresh();
|
|
1048
|
-
}
|
|
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);
|
|
1049
1244
|
|
|
1050
|
-
|
|
1051
|
-
this._viewport.getImplementation().getMiniMap()[this.getShowMiniMap() ? "open" : "close"]();
|
|
1052
|
-
}
|
|
1053
|
-
};
|
|
1245
|
+
this._messagePopover?.setVisible(this.getEnableNotifications() && this._messagePopover.getAggregation("_messagePopover").getItems().length > 0);
|
|
1054
1246
|
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
this._sceneTree = new SceneTree({
|
|
1058
|
-
layoutData: new SplitterLayoutData({
|
|
1059
|
-
size: "320px",
|
|
1060
|
-
minSize: 200
|
|
1061
|
-
}),
|
|
1062
|
-
viewStateManager: this._viewStateManager,
|
|
1063
|
-
contentConnector: this._contentConnector
|
|
1064
|
-
});
|
|
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"]();
|
|
1065
1249
|
}
|
|
1066
|
-
return this;
|
|
1067
1250
|
};
|
|
1068
1251
|
|
|
1069
1252
|
Viewer.prototype._instantiateStepNavigation = function() {
|
|
1070
|
-
if (this._stepNavigation) {
|
|
1071
|
-
this._layout.removeItem(this._stepNavigation);
|
|
1072
|
-
this._viewport.removeContent(this._stepNavigation);
|
|
1073
|
-
this._splitter.detachResize(this._handleSplitterResize, this);
|
|
1074
|
-
this._stepNavigation.destroy();
|
|
1075
|
-
this._stepNavigation = null;
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
1253
|
var className = this._mainScene.getMetadata().getName();
|
|
1079
1254
|
|
|
1080
1255
|
/**
|
|
@@ -1083,6 +1258,7 @@ sap.ui.define([
|
|
|
1083
1258
|
*/
|
|
1084
1259
|
if (className === "sap.ui.vk.dvl.Scene") {
|
|
1085
1260
|
this._stepNavigation = new StepNavigation({
|
|
1261
|
+
visible: "{_internal>/stepNavigation/visible}",
|
|
1086
1262
|
showThumbnails: this.getShowStepNavigationThumbnails(),
|
|
1087
1263
|
contentConnector: this._contentConnector
|
|
1088
1264
|
});
|
|
@@ -1091,41 +1267,29 @@ sap.ui.define([
|
|
|
1091
1267
|
|
|
1092
1268
|
if (this._stepNavigation == null && (className === "sap.ui.vk.threejs.Scene" || className === "sap.ui.vk.svg.Scene")) {
|
|
1093
1269
|
this._stepNavigation = new ViewGallery({
|
|
1270
|
+
visible: "{_internal>/stepNavigation/visible}",
|
|
1094
1271
|
host: this.getViewport(),
|
|
1095
1272
|
contentConnector: this._contentConnector,
|
|
1096
|
-
viewManager: this._viewManager
|
|
1273
|
+
viewManager: this._viewManager,
|
|
1274
|
+
animationPlayer: this._animationPlayer
|
|
1097
1275
|
});
|
|
1098
1276
|
if (!this.getOverlayStepNavigation()) {
|
|
1099
1277
|
this._layout.insertItem(this._stepNavigation, 3);
|
|
1100
1278
|
} else {
|
|
1101
1279
|
this._stepNavigation.addStyleClass("sapVizKitViewGallery");
|
|
1102
1280
|
this._viewport.addContent(this._stepNavigation);
|
|
1103
|
-
this._splitter.attachResize(this._handleSplitterResize, this);
|
|
1104
1281
|
}
|
|
1105
|
-
this._stepNavigation.setAnimationPlayer(this._animationPlayer);
|
|
1106
1282
|
}
|
|
1107
1283
|
|
|
1108
1284
|
return this;
|
|
1109
1285
|
};
|
|
1110
1286
|
|
|
1111
|
-
Viewer.prototype._handleSplitterResize = function() {
|
|
1112
|
-
this._stepNavigation.resizeToolbarSpacer();
|
|
1113
|
-
};
|
|
1114
|
-
|
|
1115
1287
|
Viewer.prototype._showViewport = function() {
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
vp.setHotspotColor(this.getProperty("hotspotColor"));
|
|
1119
|
-
vp.setHotspotColorABGR(this.getProperty("hotspotColorABGR"));
|
|
1120
|
-
vp.setShowAllHotspots(this.getProperty("showAllHotspots"));
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
if (this._nativeViewport) {
|
|
1124
|
-
this._nativeViewport.setVisible(false);
|
|
1125
|
-
}
|
|
1288
|
+
const viewport = this.getViewport();
|
|
1289
|
+
this._nativeViewport?.setVisible(false);
|
|
1126
1290
|
this._stackedViewport.removeAllContent();
|
|
1127
|
-
this._stackedViewport.addContent(
|
|
1128
|
-
|
|
1291
|
+
this._stackedViewport.addContent(viewport);
|
|
1292
|
+
viewport.setVisible(true);
|
|
1129
1293
|
|
|
1130
1294
|
return this;
|
|
1131
1295
|
};
|
|
@@ -1138,9 +1302,7 @@ sap.ui.define([
|
|
|
1138
1302
|
});
|
|
1139
1303
|
}
|
|
1140
1304
|
|
|
1141
|
-
|
|
1142
|
-
this._viewport.setVisible(false);
|
|
1143
|
-
}
|
|
1305
|
+
this._viewport?.setVisible(false);
|
|
1144
1306
|
this._stackedViewport.removeAllContent();
|
|
1145
1307
|
this._stackedViewport.addContent(this._nativeViewport);
|
|
1146
1308
|
this._nativeViewport.setVisible(true);
|
|
@@ -1312,12 +1474,6 @@ sap.ui.define([
|
|
|
1312
1474
|
return this;
|
|
1313
1475
|
};
|
|
1314
1476
|
|
|
1315
|
-
Viewer.prototype._onViewportViewActivated = function(event) {
|
|
1316
|
-
// If it's 3D content, we mark the scene tree as 'usable'.
|
|
1317
|
-
// In case of 2D, the scene tree should not be enabled.
|
|
1318
|
-
this._componentsState.sceneTree.shouldBeEnabled = event.getParameter("type") === "3D";
|
|
1319
|
-
};
|
|
1320
|
-
|
|
1321
1477
|
Viewer.prototype._removeProgressIndicator = function() {
|
|
1322
1478
|
this._progressIndicator.setVisible(false);
|
|
1323
1479
|
this._progressIndicator.setDisplayValue("");
|
|
@@ -1328,7 +1484,7 @@ sap.ui.define([
|
|
|
1328
1484
|
Viewer.prototype._handleContentReplaced = function(event) {
|
|
1329
1485
|
var content = event.getParameter("newContent");
|
|
1330
1486
|
|
|
1331
|
-
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")) {
|
|
1332
1488
|
this._showViewport();
|
|
1333
1489
|
|
|
1334
1490
|
// each time we load a 3D mode, we have to update the panning ratio of the redline control
|
|
@@ -1351,7 +1507,7 @@ sap.ui.define([
|
|
|
1351
1507
|
|
|
1352
1508
|
Viewer.prototype._handleContentChangesStarted = function(event) {
|
|
1353
1509
|
this.setBusy(true);
|
|
1354
|
-
if (this.
|
|
1510
|
+
if (this.getEnableProgressIndicator()) {
|
|
1355
1511
|
this._progressIndicator.setPercentValue(0.0);
|
|
1356
1512
|
this._progressIndicator.setVisible(true);
|
|
1357
1513
|
this._progressIndicator.rerender();
|
|
@@ -1363,6 +1519,13 @@ sap.ui.define([
|
|
|
1363
1519
|
this.setBusy(false);
|
|
1364
1520
|
var content = event.getParameter("content");
|
|
1365
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
|
+
|
|
1366
1529
|
this.fireSceneLoadingSucceeded({
|
|
1367
1530
|
scene: content
|
|
1368
1531
|
});
|