@sapui5/sap.ui.vk 1.136.2 → 1.136.3

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.
Files changed (176) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/vk/.library +1 -1
  3. package/src/sap/ui/vk/AnimationPlayback.js +1 -1
  4. package/src/sap/ui/vk/AnimationPlayer.js +1 -1
  5. package/src/sap/ui/vk/AnimationSequence.js +1 -1
  6. package/src/sap/ui/vk/AnimationTimeSlider.js +1 -1
  7. package/src/sap/ui/vk/AnimationTrack.js +1 -1
  8. package/src/sap/ui/vk/Annotation.js +1 -1
  9. package/src/sap/ui/vk/BaseNodeProxy.js +1 -1
  10. package/src/sap/ui/vk/Camera.js +1 -1
  11. package/src/sap/ui/vk/ContentConnector.js +19 -15
  12. package/src/sap/ui/vk/ContentManager.js +1 -1
  13. package/src/sap/ui/vk/ContentResource.js +3 -2
  14. package/src/sap/ui/vk/Core.js +1 -1
  15. package/src/sap/ui/vk/DownloadManager.js +1 -1
  16. package/src/sap/ui/vk/DrawerToolbar.js +140 -19
  17. package/src/sap/ui/vk/DrawerToolbarButton.js +5 -1
  18. package/src/sap/ui/vk/DvlException.js +1 -1
  19. package/src/sap/ui/vk/FlexibleControl.js +1 -1
  20. package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -1
  21. package/src/sap/ui/vk/Highlight.js +1 -1
  22. package/src/sap/ui/vk/ImageContentManager.js +1 -1
  23. package/src/sap/ui/vk/JointUtils.js +1 -1
  24. package/src/sap/ui/vk/LayerProxy.js +1 -1
  25. package/src/sap/ui/vk/Loco.js +1 -1
  26. package/src/sap/ui/vk/Material.js +1 -1
  27. package/src/sap/ui/vk/NativeViewport.js +1 -1
  28. package/src/sap/ui/vk/NodeHierarchy.js +1 -1
  29. package/src/sap/ui/vk/NodeProxy.js +1 -1
  30. package/src/sap/ui/vk/NodeUtils.js +1 -1
  31. package/src/sap/ui/vk/Notifications.js +1 -1
  32. package/src/sap/ui/vk/OrthographicCamera.js +1 -1
  33. package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
  34. package/src/sap/ui/vk/ProgressIndicator.js +1 -1
  35. package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
  36. package/src/sap/ui/vk/RedlineConversation.js +1 -1
  37. package/src/sap/ui/vk/RedlineDesign.js +1 -1
  38. package/src/sap/ui/vk/RedlineElement.js +1 -1
  39. package/src/sap/ui/vk/RedlineElementComment.js +1 -1
  40. package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
  41. package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
  42. package/src/sap/ui/vk/RedlineElementLine.js +1 -1
  43. package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
  44. package/src/sap/ui/vk/RedlineElementText.js +1 -1
  45. package/src/sap/ui/vk/RedlineSurface.js +1 -1
  46. package/src/sap/ui/vk/SafeArea.js +1 -1
  47. package/src/sap/ui/vk/Scene.js +16 -1
  48. package/src/sap/ui/vk/SceneTree.js +3 -4
  49. package/src/sap/ui/vk/StepNavigation.js +1 -2
  50. package/src/sap/ui/vk/Texture.js +1 -1
  51. package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
  52. package/src/sap/ui/vk/ToggleMenuItem.js +1 -1
  53. package/src/sap/ui/vk/Toolbar.js +68 -102
  54. package/src/sap/ui/vk/View.js +1 -1
  55. package/src/sap/ui/vk/ViewGallery.js +1 -1
  56. package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
  57. package/src/sap/ui/vk/ViewGroup.js +1 -1
  58. package/src/sap/ui/vk/ViewManager.js +1 -1
  59. package/src/sap/ui/vk/ViewStateManager.js +1 -1
  60. package/src/sap/ui/vk/ViewStateManagerBase.js +1 -1
  61. package/src/sap/ui/vk/Viewer.js +469 -234
  62. package/src/sap/ui/vk/Viewport.js +1 -1
  63. package/src/sap/ui/vk/ViewportBase.js +1 -1
  64. package/src/sap/ui/vk/dvl/BaseNodeProxy.js +1 -1
  65. package/src/sap/ui/vk/dvl/ContentManager.js +1 -1
  66. package/src/sap/ui/vk/dvl/GraphicsCore.js +1 -1
  67. package/src/sap/ui/vk/dvl/LayerProxy.js +1 -1
  68. package/src/sap/ui/vk/dvl/NodeHierarchy.js +1 -1
  69. package/src/sap/ui/vk/dvl/NodeProxy.js +1 -1
  70. package/src/sap/ui/vk/dvl/Scene.js +1 -1
  71. package/src/sap/ui/vk/dvl/ViewStateManager.js +1 -1
  72. package/src/sap/ui/vk/dvl/Viewport.js +1 -1
  73. package/src/sap/ui/vk/ecad/ElementsPanel.js +984 -212
  74. package/src/sap/ui/vk/ecad/LayersPanel.js +283 -145
  75. package/src/sap/ui/vk/i18n/messagebundle.properties +64 -37
  76. package/src/sap/ui/vk/library.js +11 -4
  77. package/src/sap/ui/vk/measurements/Angle.js +1 -1
  78. package/src/sap/ui/vk/measurements/Area.js +1 -1
  79. package/src/sap/ui/vk/measurements/Distance.js +1 -1
  80. package/src/sap/ui/vk/measurements/Edge.js +1 -1
  81. package/src/sap/ui/vk/measurements/Face.js +1 -1
  82. package/src/sap/ui/vk/measurements/Feature.js +1 -1
  83. package/src/sap/ui/vk/measurements/Vertex.js +1 -1
  84. package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
  85. package/src/sap/ui/vk/pdf/Viewport.js +5 -8
  86. package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
  87. package/src/sap/ui/vk/svg/ContentDeliveryService.js +1 -1
  88. package/src/sap/ui/vk/svg/ContentManager.js +2 -1
  89. package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
  90. package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
  91. package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
  92. package/src/sap/ui/vk/svg/Scene.js +1 -1
  93. package/src/sap/ui/vk/svg/SceneBuilder.js +12 -4
  94. package/src/sap/ui/vk/svg/ViewStateManager.js +2 -2
  95. package/src/sap/ui/vk/svg/Viewport.js +192 -2
  96. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.8.woff2 +0 -0
  97. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.8.woff2 +0 -0
  98. package/src/sap/ui/vk/themes/base/library.source.less +1 -1
  99. package/src/sap/ui/vk/themes/sap_belize_base/library.source.less +1 -1
  100. package/src/sap/ui/vk/themes/sap_bluecrystal_base/library.source.less +1 -1
  101. package/src/sap/ui/vk/themes/sap_hcb/library.source.less +1 -1
  102. package/src/sap/ui/vk/themes/sap_horizon/library.source.less +0 -5
  103. package/src/sap/ui/vk/themes/sap_horizon_dark/library.source.less +0 -5
  104. package/src/sap/ui/vk/themes/sap_horizon_hcb/library.source.less +0 -5
  105. package/src/sap/ui/vk/themes/sap_horizon_hcw/library.source.less +0 -5
  106. package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
  107. package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
  108. package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
  109. package/src/sap/ui/vk/threejs/Billboard.js +1 -1
  110. package/src/sap/ui/vk/threejs/Callout.js +1 -1
  111. package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
  112. package/src/sap/ui/vk/threejs/ContentManager.js +1 -1
  113. package/src/sap/ui/vk/threejs/DetailView.js +1 -1
  114. package/src/sap/ui/vk/threejs/HighlightPlayer.js +1 -1
  115. package/src/sap/ui/vk/threejs/Material.js +1 -1
  116. package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
  117. package/src/sap/ui/vk/threejs/NodeProxy.js +1 -1
  118. package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
  119. package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
  120. package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
  121. package/src/sap/ui/vk/threejs/Scene.js +1 -1
  122. package/src/sap/ui/vk/threejs/SceneBuilder.js +12 -1
  123. package/src/sap/ui/vk/threejs/Texture.js +1 -1
  124. package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
  125. package/src/sap/ui/vk/threejs/ViewStateManager.js +1 -1
  126. package/src/sap/ui/vk/threejs/Viewport.js +1 -1
  127. package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +1 -1
  128. package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
  129. package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
  130. package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
  131. package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
  132. package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
  133. package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
  134. package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
  135. package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
  136. package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
  137. package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
  138. package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
  139. package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
  140. package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
  141. package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
  142. package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
  143. package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
  144. package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
  145. package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
  146. package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
  147. package/src/sap/ui/vk/tools/Gizmo.js +1 -1
  148. package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
  149. package/src/sap/ui/vk/tools/MoveTool.js +1 -1
  150. package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
  151. package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +1 -1
  152. package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
  153. package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
  154. package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
  155. package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
  156. package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
  157. package/src/sap/ui/vk/tools/RotateTool.js +1 -1
  158. package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
  159. package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
  160. package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
  161. package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
  162. package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
  163. package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
  164. package/src/sap/ui/vk/tools/Tool.js +1 -1
  165. package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
  166. package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
  167. package/src/sap/ui/vk/tools/TooltipToolHandler.js +5 -0
  168. package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
  169. package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
  170. package/src/sap/ui/vk/totara/TotaraLoader.js +4 -0
  171. package/src/sap/ui/vk/ToolbarRenderer.js +0 -41
  172. package/src/sap/ui/vk/ViewerRenderer.js +0 -48
  173. package/src/sap/ui/vk/ecad/ElementsPanelRenderer.js +0 -41
  174. package/src/sap/ui/vk/ecad/LayersPanelRenderer.js +0 -41
  175. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.4.woff2 +0 -0
  176. package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.4.woff2 +0 -0
@@ -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.136.2
102
+ * @version 1.136.3
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: 0xc00000ff
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(255, 0, 0, 0.7529411764705882)"
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: this.getToolbarTitle(),
532
- visible: this.getEnableToolbar(),
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
- if (this._viewport) {
593
- this._viewport.detachEvent("viewActivated", this._onViewportViewActivated, this);
594
- this._viewport.destroy();
595
- this._viewport = null;
596
- }
719
+ this._viewport?.destroy();
720
+ this._viewport = null;
597
721
 
598
- if (this._nativeViewport) {
599
- this._nativeViewport.destroy();
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,86 @@ sap.ui.define([
668
791
  };
669
792
 
670
793
  Viewer.prototype._setMainScene = function(scene) {
671
- if (scene instanceof Scene) {
672
- if (scene !== this._mainScene) {
673
- this._mainScene = scene;
674
- this._showViewport();
675
-
676
- // Set the scene tree & step navigation state based on default settings and last user interaction (if any).
677
- if (this._componentsState.sceneTree.defaultEnable) {
678
- this._instantiateSceneTree();
679
- this.setEnableSceneTree(true);
680
- if (this._componentsState.sceneTree.userInteractionShow && this._componentsState.sceneTree.shouldBeEnabled) {
681
- this.setShowSceneTree(true);
682
- this._sceneTree.setVisible(true);
683
- } else {
684
- this.setShowSceneTree(false);
685
- }
686
- } else if (this._sceneTree && this._viewStateManager) {
687
- this._sceneTree.setScene(scene, this._viewStateManager);
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._splitter.detachResize(this._handleSplitterResize, this);
800
+ this._stepNavigation.destroy();
801
+ this._stepNavigation = null;
802
+ }
803
+ this._layersPanel?.destroy();
804
+ this._layersPanel = null;
805
+ this._elementsPanel?.destroy();
806
+ this._elementsPanel = null;
807
+ this._pageGallery?.destroy();
808
+ this._pageGallery = null;
809
+ this._mainScene = scene instanceof Scene ? scene : null;
810
+
811
+ const isSVG = scene?.getMetadata?.().getName() === "sap.ui.vk.svg.Scene";
812
+ const isECAD = isSVG && scene.isECADScene();
813
+ const isPDF = scene?.isA?.("sap.ui.vk.pdf.Document");
814
+ const data = this._data;
815
+ data.sceneTree.supported = data.stepNavigation.supported = (scene instanceof Scene) && !isECAD;
816
+ data.layersPanel.supported = data.elementsPanel.supported = isECAD;
817
+ data.hotspots.supported = isSVG && !isECAD;
818
+ data.miniMap.supported = isSVG;
819
+ data.pageGallery.supported = isPDF;
820
+ this._model?.updateBindings();
821
+
822
+ if (this._mainScene) {
823
+ // Set the scene tree & step navigation state based on default settings and last user interaction (if any).
824
+ if (data.sceneTree.supported && data.sceneTree.enabled) {
825
+ this._sceneTree = new SceneTree({
826
+ layoutData: new SplitterLayoutData({
827
+ size: "320px",
828
+ minSize: 200
829
+ }),
830
+ viewStateManager: this._viewStateManager,
831
+ contentConnector: this._contentConnector
832
+ });
833
+ }
689
834
 
690
- this.setEnableStepNavigation(this.getEnableStepNavigation() || this._componentsState.stepNavigation.defaultEnable);
691
- if (this.getEnableStepNavigation()) {
692
- this._instantiateStepNavigation();
693
- this.setShowStepNavigation(this._componentsState.stepNavigation.userInteractionShow);
694
- }
835
+ if (data.stepNavigation.supported && data.stepNavigation.enabled) {
836
+ this._instantiateStepNavigation();
695
837
  }
696
838
 
697
- if (this._stepNavigation) {
698
- this._stepNavigation.refresh(scene);
839
+ if (data.layersPanel.supported && data.layersPanel.enabled) {
840
+ this._layersPanel = new LayersPanel({
841
+ layoutData: new SplitterLayoutData({
842
+ size: "320px",
843
+ minSize: 200
844
+ }),
845
+ contentConnector: this._contentConnector,
846
+ viewStateManager: this._viewStateManager
847
+ });
848
+ }
849
+
850
+ if (data.elementsPanel.supported && data.elementsPanel.enabled) {
851
+ this._elementsPanel = new ElementsPanel({
852
+ contentConnector: this._contentConnector,
853
+ viewStateManager: this._viewStateManager,
854
+ layoutData: new SplitterLayoutData({
855
+ size: "320px",
856
+ minSize: 200
857
+ })
858
+ });
699
859
  }
700
- } else {
701
- this._mainScene = null;
702
- this.setEnableSceneTree(false);
703
- this.setEnableStepNavigation(false);
704
860
  }
861
+
862
+ if (data.pageGallery.supported) {
863
+ data.pageGallery.currentPageIndex = 0;
864
+ this._pageGallery = new PageGallery({
865
+ layoutData: new SplitterLayoutData({
866
+ size: "320px",
867
+ minSize: 200
868
+ }),
869
+ contentConnector: this._contentConnector,
870
+ currentPageIndex: "{_internal>/pageGallery/currentPageIndex}"
871
+ });
872
+ }
873
+
705
874
  return this;
706
875
  };
707
876
 
@@ -747,13 +916,14 @@ sap.ui.define([
747
916
  this._viewport = new Viewport(this.getId() + "-viewport", {
748
917
  viewStateManager: this._viewStateManager,
749
918
  selectionMode: SelectionMode.Exclusive,
750
- contentConnector: this._contentConnector // content connector must be the last parameter in the list!
919
+ contentConnector: this._contentConnector, // content connector must be the last parameter in the list!
920
+ showAllHotspots: "{_internal>/hotspots/showAll}",
921
+ hotspotColorABGR: "{_internal>/hotspots/colorABGR}",
922
+ hotspotColor: "{_internal>/hotspots/color}"
751
923
  });
752
924
 
753
- this._viewport.attachEvent("viewActivated", this._onViewportViewActivated, this);
754
-
755
925
  this._drawerToolbar = new DrawerToolbar({
756
- visible: this.getShowDrawerToolbar(),
926
+ visible: "{_internal>/drawerToolbar/visible}",
757
927
  expanded: true,
758
928
  viewport: this._viewport
759
929
  });
@@ -807,138 +977,242 @@ sap.ui.define([
807
977
  return this._redlineDesign;
808
978
  };
809
979
 
810
- Viewer.prototype.setEnableSceneTree = function(oProperty) {
811
- this.setProperty("enableSceneTree", oProperty, true);
812
- if (!oProperty) {
813
- this.setProperty("showSceneTree", false);
814
- }
980
+ Viewer.prototype.setEnableSceneTree = function(value) {
981
+ this.setProperty("enableSceneTree", value, true);
982
+ this._data.sceneTree.enabled = value;
983
+ this._model.updateBindings();
984
+ return this;
985
+ };
986
+
987
+ Viewer.prototype.setShowSceneTree = function(value) {
988
+ this.setProperty("showSceneTree", value, true);
989
+ this._data.sceneTree.visible = value;
990
+ this._model.updateBindings();
815
991
  this._updateLayout();
816
992
  return this;
817
993
  };
818
994
 
819
- Viewer.prototype.setEnableNotifications = function(oProperty) {
820
- this.setProperty("enableNotifications", oProperty, true);
821
- this._messagePopover.setVisible(false);
995
+ Viewer.prototype.setEnableStepNavigation = function(value) {
996
+ this.setProperty("enableStepNavigation", value, true);
997
+ this._data.stepNavigation.enabled = value;
998
+ this._model.updateBindings();
999
+ return this;
1000
+ };
1001
+
1002
+ Viewer.prototype.setShowStepNavigation = function(value) {
1003
+ this.setProperty("showStepNavigation", value, true);
1004
+ this._data.stepNavigation.visible = value;
1005
+ this._model.updateBindings();
1006
+ return this;
1007
+ };
1008
+
1009
+ Viewer.prototype.setEnableLayersPanel = function(value) {
1010
+ this.setProperty("enableLayersPanel", value, true);
1011
+ this._data.layersPanel.enabled = value;
1012
+ this._model.updateBindings();
1013
+ return this;
1014
+ };
1015
+
1016
+ Viewer.prototype.setShowLayersPanel = function(value) {
1017
+ this.setProperty("showLayersPanel", value, true);
1018
+ this._data.layersPanel.visible = value;
1019
+ this._model.updateBindings();
822
1020
  this._updateLayout();
823
1021
  return this;
824
1022
  };
825
1023
 
826
- Viewer.prototype.setShowSceneTree = function(oProperty) {
827
- this.setProperty("showSceneTree", oProperty, true);
1024
+ Viewer.prototype.setEnableElementsPanel = function(value) {
1025
+ this.setProperty("enableElementsPanel", value, true);
1026
+ this._data.elementsPanel.enabled = value;
1027
+ this._model.updateBindings();
1028
+ return this;
1029
+ };
1030
+
1031
+ Viewer.prototype.setShowElementsPanel = function(value) {
1032
+ this.setProperty("showElementsPanel", value, true);
1033
+ this._data.elementsPanel.visible = value;
1034
+ this._model.updateBindings();
828
1035
  this._updateLayout();
829
1036
  return this;
830
1037
  };
831
1038
 
832
- Viewer.prototype.setEnableStepNavigation = function(oProperty) {
833
- this.setProperty("enableStepNavigation", oProperty, true);
834
- if (!oProperty) {
835
- this.setProperty("showStepNavigation", false);
836
- }
1039
+ Viewer.prototype.setEnablePageGallery = function(value) {
1040
+ this.setProperty("enablePageGallery", value, true);
1041
+ this._data.pageGallery.enabled = value;
1042
+ this._model.updateBindings();
1043
+ return this;
1044
+ };
1045
+
1046
+ Viewer.prototype.setShowPageGallery = function(value) {
1047
+ this.setProperty("showPageGallery", value, true);
1048
+ this._data.pageGallery.visible = value;
1049
+ this._model.updateBindings();
837
1050
  this._updateLayout();
838
1051
  return this;
839
1052
  };
840
1053
 
841
- Viewer.prototype.setShowStepNavigation = function(oProperty) {
842
- this.setProperty("showStepNavigation", oProperty, true);
1054
+ Viewer.prototype.setEnableMiniMap = function(value) {
1055
+ this.setProperty("enableMiniMap", value, true);
1056
+ this._data.miniMap.enabled = value;
1057
+ this._model.updateBindings();
843
1058
  this._updateLayout();
844
1059
  return this;
845
1060
  };
846
1061
 
847
- Viewer.prototype.setShowMiniMap = function(oProperty) {
848
- this.setProperty("showMiniMap", oProperty, true);
1062
+ Viewer.prototype.setShowMiniMap = function(value) {
1063
+ this.setProperty("showMiniMap", value, true);
1064
+ this._data.miniMap.visible = value;
1065
+ this._model.updateBindings();
849
1066
  this._updateLayout();
850
1067
  return this;
851
1068
  };
852
1069
 
853
- Viewer.prototype.getEnableMiniMap = function() {
854
- return this.getProperty("enableMiniMap") && this._viewport?.getImplementation()?.getMetadata().getName() === "sap.ui.vk.svg.Viewport";
1070
+ Viewer.prototype.setToolbarTitle = function(value) {
1071
+ this.setProperty("toolbarTitle", value, true);
1072
+ this._data.toolbar.title = value;
1073
+ this._model.updateBindings();
1074
+ return this;
855
1075
  };
856
1076
 
857
1077
  Viewer.prototype.setEnableToolbar = function(value) {
858
1078
  this.setProperty("enableToolbar", value, true);
859
- this._toolbar.setVisible(value);
1079
+ this._data.toolbar.enabled = value;
1080
+ this._model.updateBindings();
860
1081
  return this;
861
1082
  };
862
1083
 
863
1084
  Viewer.prototype.setShowDrawerToolbar = function(value) {
864
1085
  this.setProperty("showDrawerToolbar", value, true);
865
- if (this._drawerToolbar) {
866
- this._drawerToolbar.setVisible(value);
867
- }
1086
+ this._data.drawerToolbar.visible = value;
1087
+ this._model.updateBindings();
868
1088
  return this;
869
1089
  };
870
1090
 
871
- Viewer.prototype.setRecursiveSelection = function(oProperty) {
872
- this.setProperty("recursiveSelection", oProperty, true);
873
- if (this._viewStateManager) {
874
- this._viewStateManager.setRecursiveSelection(oProperty);
875
- }
1091
+ Viewer.prototype.setHotspotsEnabled = function(value) {
1092
+ this.setProperty("hotspotsEnabled", value, true);
1093
+ this._data.hotspots.enabled = value;
1094
+ this._model.updateBindings();
876
1095
  return this;
877
1096
  };
878
1097
 
879
- Viewer.prototype.setToolbarTitle = function(value) {
880
- this.setProperty("toolbarTitle", value);
881
- this._toolbar.setTitle(value);
1098
+ Viewer.prototype.setShowAllHotspots = function(value) {
1099
+ this.setProperty("showAllHotspots", value, true);
1100
+ this._data.hotspots.showAll = value;
1101
+ this._model.updateBindings();
882
1102
  return this;
883
1103
  };
884
1104
 
885
- /**
886
- * It activates or deactivates full screen mode.
887
- * @returns {this} <code>this</code> to allow method chaining.
888
- * @public
889
- */
890
- Viewer.prototype.activateFullScreenMode = function() {
891
- const viewerDomRef = this.getDomRef();
892
- if (document.fullscreenElement === viewerDomRef) {
893
- document.exitFullscreen();
894
- } else {
895
- viewerDomRef.requestFullscreen();
896
- }
897
-
1105
+ Viewer.prototype._setHotspotColor = function(colorABGR, colorCSS) {
1106
+ this.setProperty("hotspotColorABGR", colorABGR, true);
1107
+ this.setProperty("hotspotColor", colorCSS, true);
1108
+ this._data.hotspots.colorABGR = colorABGR;
1109
+ this._data.hotspots.color = colorCSS;
1110
+ this._model.updateBindings();
898
1111
  return this;
899
1112
  };
900
1113
 
901
- Viewer.prototype.getShowAllHotspots = function() {
902
- var vp = this.getViewport().getImplementation();
903
- return vp ? vp.getShowAllHotspots() : this.getProperty("showAllHotspots");
1114
+ Viewer.prototype.setHotspotColorABGR = function(colorABGR) {
1115
+ return this._setHotspotColor(colorABGR, colorToCSSColor(abgrToColor(colorABGR)));
904
1116
  };
905
1117
 
906
- Viewer.prototype.setShowAllHotspots = function(value) {
907
- this.setProperty("showAllHotspots", value, true);
908
- var vp = this.getViewport().getImplementation();
909
- if (vp) {
910
- vp.setShowAllHotspots(value);
911
- }
912
- return this;
1118
+ Viewer.prototype.setHotspotColor = function(colorCSS) {
1119
+ return this._setHotspotColor(colorToABGR(cssColorToColor(colorCSS)), colorCSS);
913
1120
  };
914
1121
 
915
- Viewer.prototype.getHotspotColorABGR = function() {
916
- var vp = this.getViewport().getImplementation();
917
- return vp ? vp.getHotspotColorABGR() : this.getProperty("hotspotColorABGR");
1122
+ Viewer.prototype.setShouldTrackVisibilityChanges = function(value) {
1123
+ this.setProperty("shouldTrackVisibilityChanges", value, true);
1124
+ this._data.shouldTrackVisibilityChanges = value;
1125
+ this._model.updateBindings();
1126
+ return this;
918
1127
  };
919
1128
 
920
- Viewer.prototype.setHotspotColorABGR = function(value) {
921
- this.setProperty("hotspotColorABGR", value, true);
922
- this.setProperty("hotspotColor", colorToCSSColor(abgrToColor(value)), true);
923
- var vp = this.getViewport().getImplementation();
924
- if (vp) {
925
- vp.setHotspotColorABGR(value);
926
- }
1129
+ Viewer.prototype.setRecursiveSelection = function(value) {
1130
+ this.setProperty("recursiveSelection", value, true);
1131
+ this._data.recursiveSelection = value;
1132
+ this._model.updateBindings();
927
1133
  return this;
928
1134
  };
929
1135
 
930
- Viewer.prototype.getHotspotColor = function() {
931
- var vp = this.getViewport().getImplementation();
932
- return vp ? vp.getHotspotColor() : this.getProperty("hotspotColor");
1136
+ Viewer.prototype.setEnableNotifications = function(oProperty) {
1137
+ this.setProperty("enableNotifications", oProperty, true);
1138
+ this._messagePopover.setVisible(false);
1139
+ this._updateLayout();
1140
+ return this;
933
1141
  };
934
1142
 
935
- Viewer.prototype.setHotspotColor = function(value) {
936
- this.setProperty("hotspotColor", value, true);
937
- this.setProperty("hotspotColorABGR", colorToABGR(cssColorToColor(value)), true);
938
- var vp = this.getViewport().getImplementation();
939
- if (vp) {
940
- vp.setHotspotColor(value);
1143
+ /**
1144
+ * It activates or deactivates full screen mode.
1145
+ * @param {boolean} value If <code>true</code>, it activates full screen mode; if <code>false</code>, it deactivates full screen mode.
1146
+ * @returns {this} <code>this</code> to allow method chaining.
1147
+ * @public
1148
+ */
1149
+ Viewer.prototype.activateFullScreenMode = function(value) {
1150
+ // It checks if the current document is in full screen mode
1151
+ var isInFullScreenMode = function(document) {
1152
+ return !!(document.fullScreen || document.webkitIsFullScreen || document.mozFullScreen || document.msFullscreenElement);
1153
+ };
1154
+
1155
+ // Fullscreen toggle
1156
+ if (value) {
1157
+ if (!isInFullScreenMode(document)) {
1158
+ if (!this._fullScreenHandler) {
1159
+ var that = this;
1160
+ this._fullScreenHandler = function(event) {
1161
+ var isFullScreen = isInFullScreenMode(document);
1162
+ if (!isFullScreen) {
1163
+ that.removeStyleClass("sapVizKitViewerFullScreen");
1164
+
1165
+ document.removeEventListener("fullscreenchange", that._fullScreenHandler);
1166
+ document.removeEventListener("mozfullscreenchange", that._fullScreenHandler);
1167
+ document.removeEventListener("webkitfullscreenchange", that._fullScreenHandler);
1168
+ }
1169
+
1170
+ that.fireFullScreen({ isFullScreen });
1171
+ };
1172
+ }
1173
+
1174
+ // find the active viewer element to set to full screen
1175
+ var viewerElements = document.getElementsByClassName("sapVizKitViewer");
1176
+ // when viewport not loaded, activate full screen on the body element
1177
+ var bodyElement = document.getElementsByTagName("body")[0];
1178
+ if (viewerElements.length) {
1179
+ var vpElement = this.getViewport().getDomRef();
1180
+ for (var i = 0; i < viewerElements.length; ++i) {
1181
+ if (viewerElements[i].contains(vpElement)) {
1182
+ bodyElement = viewerElements[i];
1183
+ break;
1184
+ }
1185
+ }
1186
+ } else {
1187
+ return this;
1188
+ }
1189
+ if (bodyElement.requestFullScreen) {
1190
+ document.addEventListener("fullscreenchange", this._fullScreenHandler);
1191
+ bodyElement.requestFullScreen();
1192
+ } else if (bodyElement.webkitRequestFullScreen) {
1193
+ document.addEventListener("webkitfullscreenchange", this._fullScreenHandler);
1194
+ bodyElement.webkitRequestFullScreen();
1195
+ } else if (bodyElement.mozRequestFullScreen) {
1196
+ document.addEventListener("mozfullscreenchange", this._fullScreenHandler);
1197
+ bodyElement.mozRequestFullScreen();
1198
+ }
1199
+ }
1200
+
1201
+ this.addStyleClass("sapVizKitViewerFullScreen");
1202
+ } else {
1203
+ if (isInFullScreenMode(document)) {
1204
+ if (document.cancelFullScreen) {
1205
+ document.cancelFullScreen();
1206
+ } else if (document.webkitCancelFullScreen) {
1207
+ document.webkitCancelFullScreen();
1208
+ } else if (document.mozCancelFullScreen) {
1209
+ document.mozCancelFullScreen();
1210
+ }
1211
+ }
1212
+
1213
+ this.removeStyleClass("sapVizKitViewerFullScreen");
941
1214
  }
1215
+
942
1216
  return this;
943
1217
  };
944
1218
 
@@ -1009,61 +1283,34 @@ sap.ui.define([
1009
1283
  }
1010
1284
  };
1011
1285
 
1012
- Viewer.prototype._updateLayout = function() {
1013
- if (this._sceneTree) {
1014
- if (this.getShowSceneTree() && this.getEnableSceneTree()) {
1015
- this._sceneTree.setVisible(true);
1016
- if (this._splitter.indexOfContentArea(this._sceneTree) < 0) {
1017
- this._splitter.insertContentArea(this._sceneTree, 0);
1018
- }
1019
- } else {
1020
- if (this._splitter.indexOfContentArea(this._sceneTree) >= 0) {
1021
- this._splitter.removeContentArea(this._sceneTree);
1286
+ Viewer.prototype._setSplitterContent = function(control, visible, rightSide) {
1287
+ if (control) {
1288
+ control.setVisible(visible);
1289
+ if (visible) {
1290
+ if (this._splitter.indexOfContentArea(control) < 0) {
1291
+ this._splitter.insertContentArea(control, rightSide ? this._splitter.getContentAreas().length : 0);
1022
1292
  }
1023
- this._sceneTree.setVisible(false);
1293
+ } else if (this._splitter.indexOfContentArea(control) >= 0) {
1294
+ this._splitter.removeContentArea(control);
1024
1295
  }
1025
1296
  }
1297
+ };
1026
1298
 
1027
- if (this._stepNavigation) {
1028
- this._stepNavigation.setVisible(this.getShowStepNavigation() && this.getEnableStepNavigation());
1029
- }
1030
-
1031
- if (this._messagePopover) {
1032
- this._messagePopover.setVisible(this.getEnableNotifications() && this._messagePopover.getAggregation("_messagePopover").getItems().length > 0);
1033
- }
1034
-
1035
- if (this._toolbar) {
1036
- this._toolbar.refresh();
1037
- }
1299
+ Viewer.prototype._updateLayout = function() {
1300
+ const data = this._data;
1301
+ this._setSplitterContent(this._sceneTree, data.sceneTree.visible && data.sceneTree.enabled);
1302
+ this._setSplitterContent(this._layersPanel, data.layersPanel.visible && data.layersPanel.enabled);
1303
+ this._setSplitterContent(this._elementsPanel, data.elementsPanel.visible && data.elementsPanel.enabled, true);
1304
+ this._setSplitterContent(this._pageGallery, data.pageGallery.visible && data.pageGallery.enabled);
1038
1305
 
1039
- if (this.getEnableMiniMap()) {
1040
- this._viewport.getImplementation().getMiniMap()[this.getShowMiniMap() ? "open" : "close"]();
1041
- }
1042
- };
1306
+ this._messagePopover?.setVisible(this.getEnableNotifications() && this._messagePopover.getAggregation("_messagePopover").getItems().length > 0);
1043
1307
 
1044
- Viewer.prototype._instantiateSceneTree = function() {
1045
- if (!this._sceneTree) {
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
- });
1308
+ if (data.miniMap.supported && this._viewport?.getImplementation()?.getMetadata().getName() === "sap.ui.vk.svg.Viewport") {
1309
+ this._viewport.getImplementation().getMiniMap()[data.miniMap.visible && data.miniMap.enabled ? "open" : "close"]();
1054
1310
  }
1055
- return this;
1056
1311
  };
1057
1312
 
1058
1313
  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
1314
  var className = this._mainScene.getMetadata().getName();
1068
1315
 
1069
1316
  /**
@@ -1072,6 +1319,7 @@ sap.ui.define([
1072
1319
  */
1073
1320
  if (className === "sap.ui.vk.dvl.Scene") {
1074
1321
  this._stepNavigation = new StepNavigation({
1322
+ visible: "{_internal>/stepNavigation/visible}",
1075
1323
  showThumbnails: this.getShowStepNavigationThumbnails(),
1076
1324
  contentConnector: this._contentConnector
1077
1325
  });
@@ -1080,41 +1328,29 @@ sap.ui.define([
1080
1328
 
1081
1329
  if (this._stepNavigation == null && (className === "sap.ui.vk.threejs.Scene" || className === "sap.ui.vk.svg.Scene")) {
1082
1330
  this._stepNavigation = new ViewGallery({
1331
+ visible: "{_internal>/stepNavigation/visible}",
1083
1332
  host: this.getViewport(),
1084
1333
  contentConnector: this._contentConnector,
1085
- viewManager: this._viewManager
1334
+ viewManager: this._viewManager,
1335
+ animationPlayer: this._animationPlayer
1086
1336
  });
1087
1337
  if (!this.getOverlayStepNavigation()) {
1088
1338
  this._layout.insertItem(this._stepNavigation, 3);
1089
1339
  } else {
1090
1340
  this._stepNavigation.addStyleClass("sapVizKitViewGallery");
1091
1341
  this._viewport.addContent(this._stepNavigation);
1092
- this._splitter.attachResize(this._handleSplitterResize, this);
1093
1342
  }
1094
- this._stepNavigation.setAnimationPlayer(this._animationPlayer);
1095
1343
  }
1096
1344
 
1097
1345
  return this;
1098
1346
  };
1099
1347
 
1100
- Viewer.prototype._handleSplitterResize = function() {
1101
- this._stepNavigation.resizeToolbarSpacer();
1102
- };
1103
-
1104
1348
  Viewer.prototype._showViewport = function() {
1105
- var vp = this.getViewport().getImplementation();
1106
- if (vp) {
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
- }
1349
+ const viewport = this.getViewport();
1350
+ this._nativeViewport?.setVisible(false);
1115
1351
  this._stackedViewport.removeAllContent();
1116
- this._stackedViewport.addContent(this._viewport);
1117
- this._viewport.setVisible(true);
1352
+ this._stackedViewport.addContent(viewport);
1353
+ viewport.setVisible(true);
1118
1354
 
1119
1355
  return this;
1120
1356
  };
@@ -1127,9 +1363,7 @@ sap.ui.define([
1127
1363
  });
1128
1364
  }
1129
1365
 
1130
- if (this._viewport) {
1131
- this._viewport.setVisible(false);
1132
- }
1366
+ this._viewport?.setVisible(false);
1133
1367
  this._stackedViewport.removeAllContent();
1134
1368
  this._stackedViewport.addContent(this._nativeViewport);
1135
1369
  this._nativeViewport.setVisible(true);
@@ -1301,12 +1535,6 @@ sap.ui.define([
1301
1535
  return this;
1302
1536
  };
1303
1537
 
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
1538
  Viewer.prototype._removeProgressIndicator = function() {
1311
1539
  this._progressIndicator.setVisible(false);
1312
1540
  this._progressIndicator.setDisplayValue("");
@@ -1317,7 +1545,7 @@ sap.ui.define([
1317
1545
  Viewer.prototype._handleContentReplaced = function(event) {
1318
1546
  var content = event.getParameter("newContent");
1319
1547
 
1320
- if (content instanceof Scene || content instanceof HTMLImageElement || content instanceof HTMLObjectElement) {
1548
+ if (content instanceof Scene || content instanceof HTMLImageElement || content instanceof HTMLObjectElement || content?.isA?.("sap.ui.vk.pdf.Document")) {
1321
1549
  this._showViewport();
1322
1550
 
1323
1551
  // each time we load a 3D mode, we have to update the panning ratio of the redline control
@@ -1340,7 +1568,7 @@ sap.ui.define([
1340
1568
 
1341
1569
  Viewer.prototype._handleContentChangesStarted = function(event) {
1342
1570
  this.setBusy(true);
1343
- if (this._componentsState.progressIndicator.defaultEnable) {
1571
+ if (this.getEnableProgressIndicator()) {
1344
1572
  this._progressIndicator.setPercentValue(0.0);
1345
1573
  this._progressIndicator.setVisible(true);
1346
1574
  this._progressIndicator.rerender();
@@ -1352,6 +1580,13 @@ sap.ui.define([
1352
1580
  this.setBusy(false);
1353
1581
  var content = event.getParameter("content");
1354
1582
  if (content) {
1583
+ if (this._pageGallery) {
1584
+ const viewportImplementation = this._viewport.getImplementation();
1585
+ if (viewportImplementation?.getMetadata().getName() === "sap.ui.vk.pdf.Viewport") {
1586
+ viewportImplementation.bindProperty("currentPageIndex", "_internal>/pageGallery/currentPageIndex");
1587
+ }
1588
+ }
1589
+
1355
1590
  this.fireSceneLoadingSucceeded({
1356
1591
  scene: content
1357
1592
  });