@sapui5/sap.ui.vk 1.135.0 → 1.136.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.
Files changed (166) 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 +1 -1
  12. package/src/sap/ui/vk/ContentManager.js +1 -1
  13. package/src/sap/ui/vk/ContentResource.js +9 -1
  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 +1 -1
  17. package/src/sap/ui/vk/DvlException.js +1 -1
  18. package/src/sap/ui/vk/FlexibleControl.js +1 -1
  19. package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -1
  20. package/src/sap/ui/vk/Highlight.js +1 -1
  21. package/src/sap/ui/vk/ImageContentManager.js +1 -1
  22. package/src/sap/ui/vk/JointUtils.js +1 -1
  23. package/src/sap/ui/vk/LayerProxy.js +1 -1
  24. package/src/sap/ui/vk/Loco.js +1 -1
  25. package/src/sap/ui/vk/Material.js +1 -1
  26. package/src/sap/ui/vk/NativeViewport.js +1 -1
  27. package/src/sap/ui/vk/NodeHierarchy.js +1 -1
  28. package/src/sap/ui/vk/NodeProxy.js +1 -1
  29. package/src/sap/ui/vk/NodeUtils.js +1 -1
  30. package/src/sap/ui/vk/Notifications.js +1 -1
  31. package/src/sap/ui/vk/OrthographicCamera.js +1 -1
  32. package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
  33. package/src/sap/ui/vk/ProgressIndicator.js +1 -1
  34. package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
  35. package/src/sap/ui/vk/RedlineConversation.js +1 -1
  36. package/src/sap/ui/vk/RedlineDesign.js +1 -1
  37. package/src/sap/ui/vk/RedlineElement.js +1 -1
  38. package/src/sap/ui/vk/RedlineElementComment.js +1 -1
  39. package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
  40. package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
  41. package/src/sap/ui/vk/RedlineElementLine.js +1 -1
  42. package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
  43. package/src/sap/ui/vk/RedlineElementText.js +1 -1
  44. package/src/sap/ui/vk/RedlineSurface.js +1 -1
  45. package/src/sap/ui/vk/SafeArea.js +1 -1
  46. package/src/sap/ui/vk/Scene.js +1 -1
  47. package/src/sap/ui/vk/SceneTree.js +1 -1
  48. package/src/sap/ui/vk/StepNavigation.js +1 -1
  49. package/src/sap/ui/vk/Texture.js +1 -1
  50. package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
  51. package/src/sap/ui/vk/ToggleMenuItem.js +1 -1
  52. package/src/sap/ui/vk/Toolbar.js +1 -1
  53. package/src/sap/ui/vk/View.js +1 -1
  54. package/src/sap/ui/vk/ViewGallery.js +1 -1
  55. package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
  56. package/src/sap/ui/vk/ViewGroup.js +1 -1
  57. package/src/sap/ui/vk/ViewManager.js +1 -1
  58. package/src/sap/ui/vk/ViewStateManager.js +1 -1
  59. package/src/sap/ui/vk/ViewStateManagerBase.js +1 -1
  60. package/src/sap/ui/vk/Viewer.js +1 -1
  61. package/src/sap/ui/vk/Viewport.js +1 -1
  62. package/src/sap/ui/vk/ViewportBase.js +1 -1
  63. package/src/sap/ui/vk/VisibilityMode.js +2 -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 +469 -0
  74. package/src/sap/ui/vk/ecad/ElementsPanelRenderer.js +41 -0
  75. package/src/sap/ui/vk/ecad/LayersPanel.js +440 -0
  76. package/src/sap/ui/vk/ecad/LayersPanelRenderer.js +41 -0
  77. package/src/sap/ui/vk/ecad/VisibilityType.js +31 -0
  78. package/src/sap/ui/vk/i18n/messagebundle.properties +50 -0
  79. package/src/sap/ui/vk/library.js +4 -3
  80. package/src/sap/ui/vk/measurements/Angle.js +1 -1
  81. package/src/sap/ui/vk/measurements/Area.js +1 -1
  82. package/src/sap/ui/vk/measurements/Distance.js +1 -1
  83. package/src/sap/ui/vk/measurements/Edge.js +1 -1
  84. package/src/sap/ui/vk/measurements/Face.js +1 -1
  85. package/src/sap/ui/vk/measurements/Feature.js +1 -1
  86. package/src/sap/ui/vk/measurements/Vertex.js +1 -1
  87. package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
  88. package/src/sap/ui/vk/pdf/PageGallery.js +3 -5
  89. package/src/sap/ui/vk/pdf/Viewport.js +1 -1
  90. package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
  91. package/src/sap/ui/vk/svg/ContentDeliveryService.js +2 -1
  92. package/src/sap/ui/vk/svg/ContentManager.js +2 -1
  93. package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
  94. package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
  95. package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
  96. package/src/sap/ui/vk/svg/Scene.js +1 -1
  97. package/src/sap/ui/vk/svg/SceneBuilder.js +1 -1
  98. package/src/sap/ui/vk/svg/ViewStateManager.js +1 -1
  99. package/src/sap/ui/vk/svg/Viewport.js +1 -1
  100. package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
  101. package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
  102. package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
  103. package/src/sap/ui/vk/threejs/Billboard.js +2 -2
  104. package/src/sap/ui/vk/threejs/Callout.js +1 -1
  105. package/src/sap/ui/vk/threejs/ContentDeliveryService.js +2 -1
  106. package/src/sap/ui/vk/threejs/ContentManager.js +1 -1
  107. package/src/sap/ui/vk/threejs/DetailView.js +1 -1
  108. package/src/sap/ui/vk/threejs/HighlightPlayer.js +1 -1
  109. package/src/sap/ui/vk/threejs/Material.js +1 -1
  110. package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
  111. package/src/sap/ui/vk/threejs/NodeProxy.js +1 -1
  112. package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
  113. package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
  114. package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
  115. package/src/sap/ui/vk/threejs/Scene.js +1 -1
  116. package/src/sap/ui/vk/threejs/SceneBuilder.js +2 -2
  117. package/src/sap/ui/vk/threejs/Texture.js +1 -1
  118. package/src/sap/ui/vk/threejs/ThreeExtensions.js +9 -1
  119. package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
  120. package/src/sap/ui/vk/threejs/ViewStateManager.js +1 -1
  121. package/src/sap/ui/vk/threejs/Viewport.js +1 -1
  122. package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +1 -1
  123. package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
  124. package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
  125. package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
  126. package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
  127. package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
  128. package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
  129. package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
  130. package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
  131. package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
  132. package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
  133. package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
  134. package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
  135. package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
  136. package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
  137. package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
  138. package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
  139. package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
  140. package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
  141. package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
  142. package/src/sap/ui/vk/tools/Gizmo.js +1 -1
  143. package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
  144. package/src/sap/ui/vk/tools/MoveTool.js +1 -1
  145. package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
  146. package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +1 -1
  147. package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
  148. package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
  149. package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
  150. package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
  151. package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
  152. package/src/sap/ui/vk/tools/RotateTool.js +1 -1
  153. package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
  154. package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
  155. package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
  156. package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
  157. package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
  158. package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
  159. package/src/sap/ui/vk/tools/Tool.js +1 -1
  160. package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
  161. package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
  162. package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
  163. package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
  164. package/src/sap/ui/vk/totara/TotaraUtils.js +5 -0
  165. package/src/sap/ui/vk/ve/dvl.js +1 -1
  166. package/src/sap/ui/vk/ve/dvl.wasm +0 -0
@@ -0,0 +1,440 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
7
+
8
+ // Provides control sap.ui.vk.ecad.LayerPanel
9
+ sap.ui.define([
10
+ "sap/m/Button",
11
+ "sap/m/SearchField",
12
+ "sap/m/OverflowToolbar",
13
+ "sap/m/ToolbarLayoutData",
14
+ "sap/m/ToolbarSpacer",
15
+ "sap/m/Text",
16
+ "sap/m/Table",
17
+ "sap/m/Column",
18
+ "sap/m/Sticky",
19
+ "sap/m/ScrollContainer",
20
+ "sap/m/ColumnListItem",
21
+ "sap/ui/core/Core",
22
+ "sap/ui/core/Control",
23
+ "sap/ui/core/Element",
24
+ "sap/ui/core/Icon",
25
+ "sap/ui/core/library",
26
+ "sap/ui/core/ResizeHandler",
27
+ "sap/ui/model/json/JSONModel",
28
+ "../Core",
29
+ "../library",
30
+ "../ViewStateManager",
31
+ "./LayersPanelRenderer",
32
+ "./VisibilityType",
33
+ "../getResourceBundle"
34
+ ], function(
35
+ Button,
36
+ SearchField,
37
+ OverflowToolbar,
38
+ ToolbarLayoutData,
39
+ ToolbarSpacer,
40
+ Text,
41
+ Table,
42
+ Column,
43
+ Sticky,
44
+ ScrollContainer,
45
+ ColumnListItem,
46
+ Core,
47
+ Control,
48
+ Element,
49
+ Icon,
50
+ Library,
51
+ ResizeHandler,
52
+ JSONModel,
53
+ vkCore,
54
+ vkLibrary,
55
+ ViewStateManager,
56
+ LayersPanelRenderer,
57
+ VisibilityType,
58
+ getResourceBundle
59
+ ) {
60
+ "use strict";
61
+
62
+ /**
63
+ * Constructor for a new LayersPanel.
64
+ *
65
+ * @param {string} [sId] id for the new control, generated automatically if no id is given
66
+ * @param {object} [mSettings] initial settings for the new control
67
+ *
68
+ * @class Provides a flat list view of all the ECAD layers in a given scene in table format.
69
+ * @extends sap.ui.core.Control
70
+ *
71
+ * @author SAP SE
72
+ * @version 1.136.0
73
+ *
74
+ * @constructor
75
+ * @public
76
+ * @alias sap.ui.vk.ecad.LayersPanel
77
+ * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
78
+ * @since 1.136.0
79
+ */
80
+ var LayersPanel = Control.extend("sap.ui.vk.ecad.LayersPanel", /** @lends sap.ui.vk.ecad.LayersPanel.prototype */ {
81
+ metadata: {
82
+ library: "sap.ui.vk",
83
+ aggregations: {
84
+ content: {
85
+ type: "sap.m.ScrollContainer",
86
+ multiple: false
87
+ }
88
+ },
89
+ associations: {
90
+ /**
91
+ * An association to the <code>ContentConnector</code> instance that manages content resources.
92
+ */
93
+ contentConnector: {
94
+ type: "sap.ui.vk.ContentConnector",
95
+ multiple: false
96
+ },
97
+
98
+ /**
99
+ * An association to the <code>ViewStateManager</code> instance.
100
+ */
101
+ viewStateManager: {
102
+ type: "sap.ui.vk.ViewStateManagerBase",
103
+ multiple: false
104
+ }
105
+ },
106
+ events: {
107
+ /**
108
+ * This event will be fired when content is replaced.
109
+ */
110
+ contentChanged: {
111
+ enableEventBubbling: true
112
+ }
113
+ }
114
+ },
115
+
116
+ renderer: LayersPanelRenderer,
117
+
118
+ constructor: function(sId, mSettings) {
119
+ Control.apply(this, arguments);
120
+ vkCore.observeAssociations(this);
121
+ }
122
+ });
123
+
124
+ var iconHidden = "sap-icon://status-inactive";
125
+ var iconPartial = "sap-icon://rhombus-milestone";
126
+ var iconVisible = "sap-icon://rhombus-milestone-2";
127
+
128
+ LayersPanel.prototype.onSetViewStateManager = function(manager) {
129
+ this._manager = manager;
130
+ manager.attachVisibilityChanged(this._onVisibilityChanged, this);
131
+ this.refresh();
132
+ };
133
+
134
+ LayersPanel.prototype.onUnsetViewStateManager = function(manager) {
135
+ this._manager = null;
136
+ manager.detachVisibilityChanged(this._onVisibilityChanged, this);
137
+ this.refresh();
138
+ };
139
+
140
+ LayersPanel.prototype.onSetContentConnector = function(connector) {
141
+ connector.attachContentReplaced(this._onContentReplaced, this);
142
+ connector.attachContentChangesFinished(this._onContentChangesFinished, this);
143
+ this._setContent(connector.getContent());
144
+ };
145
+
146
+ LayersPanel.prototype.onUnsetContentConnector = function(connector) {
147
+ this._setContent(null);
148
+ connector.detachContentReplaced(this._onContentReplaced, this);
149
+ connector.detachContentChangesFinished(this._onContentChangesFinished, this);
150
+ };
151
+
152
+ LayersPanel.prototype.init = function() {
153
+ if (Control.prototype.init) {
154
+ Control.prototype.init.apply(this);
155
+ }
156
+ var that = this;
157
+
158
+ this._showButton = new Button({
159
+ enabled: false,
160
+ iconFirst: true,
161
+ icon: iconVisible,
162
+ text: getResourceBundle().getText("LAYERS_PANEL_SHOW_BUTTON"),
163
+ tooltip: getResourceBundle().getText("LAYERS_PANEL_SHOW_BUTTON_TOOLTIP"),
164
+ press: this._onShowLayers.bind(this)
165
+ });
166
+
167
+ this._hideButton = new Button({
168
+ enabled: false,
169
+ iconFirst: true,
170
+ icon: iconHidden,
171
+ text: getResourceBundle().getText("LAYERS_PANEL_HIDE_BUTTON"),
172
+ tooltip: getResourceBundle().getText("LAYERS_PANEL_HIDE_BUTTON_TOOLTIP"),
173
+ press: this._onHideLayers.bind(this)
174
+ });
175
+
176
+ this._table = new Table({
177
+ mode: "MultiSelect",
178
+ sticky: [Sticky.HeaderToolbar, Sticky.ColumnHeaders],
179
+ selectionChange: this._onSelectionChanged.bind(this),
180
+ headerToolbar: new OverflowToolbar({
181
+ content: [
182
+ new SearchField({
183
+ layoutData: new ToolbarLayoutData({
184
+ shrinkable: true,
185
+ maxWidth: "400px"
186
+ }),
187
+ search: function(event) {
188
+ this._onSearch(event.getParameter("query")).bind(this);
189
+ }
190
+ }),
191
+ new ToolbarSpacer(),
192
+ this._showButton,
193
+ this._hideButton
194
+ ]
195
+ }),
196
+ columns: [
197
+ new Column({
198
+ minScreenWidth: "10rem",
199
+ hAlign: Library.TextAlign.Begin,
200
+ header: new Text({ text: getResourceBundle().getText("LAYERS_PANEL__NAME_COLUMN") })
201
+
202
+ }),
203
+ new Column({
204
+ minScreenWidth: "6rem",
205
+ hAlign: Library.TextAlign.Center,
206
+ header: new Text({ text: getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN") })
207
+ })
208
+ ],
209
+ items: {
210
+ path: "/",
211
+ template: new ColumnListItem({
212
+ vAlign: "Middle",
213
+ cells: [
214
+ new Text({
215
+ text: "{name}"
216
+ }),
217
+ new Icon({
218
+ src: {
219
+ path: "",
220
+ formatter: function(layer) {
221
+ var type = that._getVisibility(layer);
222
+ if (type === VisibilityType.Hidden) {
223
+ return iconHidden;
224
+ } else if (type === VisibilityType.Partial) {
225
+ return iconPartial;
226
+ }
227
+ return iconVisible;
228
+ }
229
+ },
230
+ tooltip: {
231
+ path: "",
232
+ formatter: function(layer) {
233
+ var type = that._getVisibility(layer);
234
+ if (type === VisibilityType.Hidden) {
235
+ return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP");
236
+ } else if (type === VisibilityType.Partial) {
237
+ return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP");
238
+ }
239
+ return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP");
240
+ }
241
+ }
242
+ })
243
+ ]
244
+ })
245
+ }
246
+ });
247
+
248
+ this._scrollContainer = new ScrollContainer({
249
+ vertical: true,
250
+ horizontal: false,
251
+ height: "100%",
252
+ content: this._table
253
+ });
254
+
255
+ this.setAggregation("content", this._scrollContainer);
256
+
257
+ this._scene = null;
258
+ this._model = new JSONModel();
259
+ this._table.setModel(this._model);
260
+ };
261
+
262
+ LayersPanel.prototype.refresh = function() {
263
+ if (!this._scene || !this._manager || !this._manager.getNodeHierarchy()) {
264
+ this._model.setData([]);
265
+ return;
266
+ }
267
+ // scan the tree and collect layers info
268
+ var layers = new Map();
269
+ this._scanTree(layers, this._manager.getNodeHierarchy().getSceneRef());
270
+
271
+ this._model.setData(layers.values().toArray());
272
+ this._table.setModel(this._model);
273
+ this.fireContentChanged();
274
+ };
275
+
276
+ LayersPanel.prototype.onBeforeRendering = function() {
277
+ this._table.setVisible(true);
278
+ if (!this._resizeListenerId) {
279
+ this._resizeListenerId = ResizeHandler.register(this, this._handleResize.bind(this));
280
+ }
281
+ };
282
+
283
+ LayersPanel.prototype._setScene = function(scene) {
284
+ this._scene = scene;
285
+ this.refresh();
286
+ };
287
+
288
+ LayersPanel.prototype._getVisibility = function(layer) {
289
+ if (layer.hiddenElements === 0) {
290
+ return VisibilityType.Visible;
291
+ } else if (layer.hiddenElements < layer.elements.size) {
292
+ return VisibilityType.Partial;
293
+ }
294
+ return VisibilityType.Hidden;
295
+ };
296
+
297
+ LayersPanel.prototype._extractMetadata = function(metadata) {
298
+ if (metadata.length != undefined) {
299
+ var map = new Map();
300
+ metadata.forEach(function(entry) {
301
+ if (entry.category === "ecad") {
302
+ map.set(entry.tag, entry.value);
303
+ }
304
+ });
305
+ return map;
306
+ }
307
+ return null;
308
+ };
309
+
310
+ LayersPanel.prototype._addElement = function(layers, layerName, nodeRef, nodeVisibility) {
311
+ var layer = layers.get(layerName);
312
+ if (!layer) {
313
+ layer = {
314
+ name: layerName,
315
+ order: 0, // wait until CAD Translators support
316
+ elements: new Map(),
317
+ hiddenElements: 0
318
+ };
319
+ layers.set(layerName, layer);
320
+ }
321
+ if (nodeVisibility == false) {
322
+ layer.hiddenElements++;
323
+ }
324
+ layer.elements.set(nodeRef.uid, nodeRef);
325
+ };
326
+
327
+ LayersPanel.prototype._scanTree = function(layers, nodeRef) {
328
+ var hierarchy = this._manager.getNodeHierarchy();
329
+ var node = hierarchy.createNodeProxy(nodeRef);
330
+ var metadata = this._extractMetadata(node.getNodeMetadata());
331
+ hierarchy.destroyNodeProxy(node);
332
+
333
+ if (metadata) {
334
+ var layer = metadata.get("layer");
335
+ if (layer) {
336
+ this._addElement(layers, layer, nodeRef, this._manager.getVisibilityState(nodeRef));
337
+ return; // don't go further down the hierarchy
338
+ }
339
+ }
340
+
341
+ hierarchy.getChildren(nodeRef).forEach(function(ref) {
342
+ this._scanTree(layers, ref);
343
+ }, this);
344
+ };
345
+
346
+ LayersPanel.prototype._onSelectionChanged = function(event) {
347
+ this._updateButtons();
348
+ };
349
+
350
+ LayersPanel.prototype._onVisibilityChanged = function(event) {
351
+ //
352
+ };
353
+
354
+ LayersPanel.prototype._handleResize = function(event) {
355
+ // this._updateSelection();
356
+ };
357
+
358
+ LayersPanel.prototype._setContent = function(content) {
359
+ // If there is no explicitly assigned view state manager then use the content connector's default one.
360
+ if (content && !this.getViewStateManager()) {
361
+ var connector = Element.getElementById(this.getContentConnector());
362
+ if (connector) {
363
+ var defaultManager = connector.getDefaultViewStateManager();
364
+ if (defaultManager) {
365
+ this.setViewStateManager(defaultManager);
366
+ }
367
+ }
368
+ }
369
+ this._setScene(content);
370
+ return this;
371
+ };
372
+
373
+ LayersPanel.prototype._onContentReplaced = function(event) {
374
+ this._setContent(event.getParameter("newContent"));
375
+ };
376
+
377
+ LayersPanel.prototype._onContentChangesFinished = function(event) {
378
+ this.refresh();
379
+ };
380
+
381
+ LayersPanel.prototype._updateButtons = function() {
382
+ var canShow = false, canHide = false;
383
+ var selected = this._table.getSelectedItems();
384
+
385
+ selected.forEach(function(item) {
386
+ var layer = item.getBindingContext().getObject();
387
+ var visibility = this._getVisibility(layer);
388
+
389
+ if (visibility === VisibilityType.Visible) {
390
+ canHide = true;
391
+ } else if (visibility === VisibilityType.Hidden) {
392
+ canShow = true;
393
+ } else {
394
+ canHide = canShow = true;
395
+ }
396
+
397
+ }, this);
398
+
399
+ this._showButton.setEnabled(canShow);
400
+ this._hideButton.setEnabled(canHide);
401
+ };
402
+
403
+ LayersPanel.prototype._onShowLayers = function() {
404
+ var toShow = [];
405
+ var selected = this._table.getSelectedItems();
406
+
407
+ selected.forEach(function(item) {
408
+ var layer = item.getBindingContext().getObject();
409
+ if (layer.hiddenElements !== 0) {
410
+ layer.hiddenElements = 0;
411
+ layer.elements.forEach(function(nodeRef) {
412
+ toShow.push(nodeRef);
413
+ });
414
+ }
415
+ });
416
+ this._manager.setVisibilityState(toShow, true, true, true);
417
+ this._model.updateBindings(true);
418
+ this._updateButtons();
419
+ };
420
+
421
+ LayersPanel.prototype._onHideLayers = function() {
422
+ var toHide = [];
423
+ var selected = this._table.getSelectedItems();
424
+
425
+ selected.forEach(function(item) {
426
+ var layer = item.getBindingContext().getObject();
427
+ if (layer.hiddenElements !== layer.elements.size) {
428
+ layer.hiddenElements = layer.elements.size;
429
+ layer.elements.forEach(function(nodeRef) {
430
+ toHide.push(nodeRef);
431
+ });
432
+ }
433
+ });
434
+ this._manager.setVisibilityState(toHide, false, true, true);
435
+ this._model.updateBindings(true);
436
+ this._updateButtons();
437
+ };
438
+
439
+ return LayersPanel;
440
+ });
@@ -0,0 +1,41 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
7
+
8
+ sap.ui.define([
9
+ ], function() {
10
+ "use strict";
11
+
12
+ /**
13
+ * LayersPanel renderer.
14
+ * @namespace
15
+ * @since 1.136.0
16
+ */
17
+ var LayersPanelRenderer = {
18
+ apiVersion: 2
19
+ };
20
+
21
+ /**
22
+ * Renders the HTML for the given control, using the provided
23
+ * {@link sap.ui.core.RenderManager}.
24
+ *
25
+ * @param {sap.ui.core.RenderManager} oRm
26
+ * the RenderManager that can be used for writing to
27
+ * the Render-Output-Buffer
28
+ * @param {sap.ui.core.Control} oControl
29
+ * the control to be rendered
30
+ */
31
+ LayersPanelRenderer.render = function(oRm, oControl) {
32
+ oRm.openStart("div", oControl);
33
+ oRm.class("sapUiSizeCompact");
34
+ oRm.openEnd();
35
+ oRm.renderControl(oControl.getAggregation("content"));
36
+ oRm.close("div");
37
+ };
38
+
39
+ return LayersPanelRenderer;
40
+
41
+ });
@@ -0,0 +1,31 @@
1
+ /*!
2
+ * SAP UI development toolkit for HTML5 (SAPUI5)
3
+
4
+ (c) Copyright 2009-2015 SAP SE. All rights reserved
5
+
6
+ */
7
+
8
+ sap.ui.define([
9
+ "sap/ui/base/DataType"
10
+ ], function(
11
+ DataType
12
+ ) {
13
+ "use strict";
14
+
15
+ /**
16
+ * ECAD visibility type.
17
+ * @enum {number}
18
+ * @readonly
19
+ * @alias sap.ui.vk.ecad.VisibilityType
20
+ * @private
21
+ */
22
+ var VisibilityType = {
23
+ Hidden: 0,
24
+ Partial: 1,
25
+ Visible: 2
26
+ };
27
+
28
+ DataType.registerEnum("sap.ui.vk.ecad.VisibilityType", VisibilityType);
29
+
30
+ return VisibilityType;
31
+ });
@@ -655,3 +655,53 @@ SLIDER_TOOLTIP=Preview zoom level
655
655
 
656
656
  #XTOL: Mini-map toogle toolbar button tooltip
657
657
  MINIMAP_BUTTONTOOLTIP=Mini-Map
658
+
659
+ #XTOL: Text for Show Layers button in LayersPanel
660
+ LAYERS_PANEL_SHOW_BUTTON=Show
661
+ #XTOL: Tooltip for for Show Layers button in LayersPanel
662
+ LAYERS_PANEL_SHOW_BUTTON_TOOLTIP=Show Layer(s)
663
+ #XTOL: Text for Hide Layers button in LayersPanel
664
+ LAYERS_PANEL_HIDE_BUTTON=Hide
665
+ #XTOL: Tooltip for for Hide Layers button in LayersPanel
666
+ LAYERS_PANEL_HIDE_BUTTON_TOOLTIP=Hide Layer(s)
667
+ #XTOL: Text for Name column in LayersPanel table
668
+ LAYERS_PANEL__NAME_COLUMN=Name
669
+ #XTOL: Text for Visible column in LayersPanel table
670
+ LAYERS_PANEL_VISIBLE_COLUMN=Visible
671
+ #XTOL: Tooltip for for Visible column icon in visible state
672
+ LAYERS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP=Visible layer
673
+ #XTOL: Tooltip for for Visible column icon in partially visible state
674
+ LAYERS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP=Partially visible layer
675
+ #XTOL: Tooltip for for Visible column icon in partially visible state
676
+ LAYERS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP=Hidden layer
677
+
678
+ #XTOL: Text for Show Element button in ElementsPanel
679
+ ELEMENTS_PANEL_SHOW_BUTTON=Show
680
+ #XTOL: Tooltip for for Show Elements button in ElementsPanel
681
+ ELEMENTS_PANEL_SHOW_BUTTON_TOOLTIP=Show Element(s)
682
+ #XTOL: Text for Hide Elements button in ElementsPanel
683
+ ELEMENTS_PANEL_HIDE_BUTTON=Hide
684
+ #XTOL: Tooltip for for Hide Elements button in ElementsPanel
685
+ ELEMENTS_PANEL_HIDE_BUTTON_TOOLTIP=Hide Element(s)
686
+ #XTOL: Tooltip for for Settings button in ElementsPanel
687
+ ELEMENTS_PANEL_SETTINGS_BUTTON_TOOLTIP=Elements panel settings
688
+ #XTOL: Text for Name column in ElementsPanel table
689
+ ELEMENTS_PANEL_NAME_COLUMN=Reference Designator
690
+ #XTOL: Text for Name column in ElementsPanel table
691
+ ELEMENTS_PANEL_TYPE_COLUMN=Type
692
+ #XTOL: Text for Name column in ElementsPanel table
693
+ ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN=Device reference
694
+ #XTOL: Text for Visible column in ElementsPanel table
695
+ ELEMENTS_PANEL_VISIBLE_COLUMN=Visible
696
+ #XTOL: Tooltip for for Visible column icon in visible state
697
+ ELEMENTS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP=Visible element
698
+ #XTOL: Tooltip for for Visible column icon in partially visible state
699
+ ELEMENTS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP=Partially visible element
700
+ #XTOL: Tooltip for for Visible column icon in partially visible state
701
+ ELEMENTS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP=Hidden element
702
+ #XTOL: Text for Component type in ElementsPanel
703
+ ELEMENTS_PANEL_TYPE_COMPONENT=Component
704
+ #XTOL: Text for Net type in ElementsPanel
705
+ ELEMENTS_PANEL_TYPE_NET=Net
706
+ #XTOL: Text for Unknown type in ElementsPanel
707
+ ELEMENTS_PANEL_TYPE_UNKNOWN=Unknown
@@ -61,7 +61,7 @@ sap.ui.define([
61
61
  * @namespace
62
62
  * @name sap.ui.vk
63
63
  * @author SAP SE
64
- * @version 1.135.0
64
+ * @version 1.136.0
65
65
  * @public
66
66
  */
67
67
 
@@ -114,7 +114,8 @@ sap.ui.define([
114
114
  "sap.ui.vk.tools.RotateToolGizmo",
115
115
  "sap.ui.vk.tools.ScaleToolGizmo",
116
116
  "sap.ui.vk.tools.SceneOrientationToolGizmo",
117
- "sap.ui.vk.tools.TooltipToolGizmo"
117
+ "sap.ui.vk.tools.TooltipToolGizmo",
118
+ "sap.ui.vk.ecad.LayersPanel"
118
119
  ],
119
120
  elements: [
120
121
  "sap.ui.vk.ContentConnector",
@@ -146,7 +147,7 @@ sap.ui.define([
146
147
  "sap.ui.vk.tools.PoiManipulationTool"
147
148
  ],
148
149
  noLibraryCSS: false,
149
- version: "1.135.0",
150
+ version: "1.136.0",
150
151
  designtime: "sap/ui/vk/designtime/library.designtime"
151
152
  });
152
153
 
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @param {object} [settings] A JSON-like object.
26
26
  * @private
27
27
  * @author SAP SE
28
- * @version 1.135.0
28
+ * @version 1.136.0
29
29
  * @alias sap.ui.vk.measurement.Angle
30
30
  * @since 1.101.0
31
31
  */
@@ -25,7 +25,7 @@ sap.ui.define([
25
25
  * @param {object} [settings] A JSON-like object.
26
26
  * @private
27
27
  * @author SAP SE
28
- * @version 1.135.0
28
+ * @version 1.136.0
29
29
  * @alias sap.ui.vk.measurement.Area
30
30
  * @since 1.101.0
31
31
  */
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  * @param {object} [settings] A JSON-like object.
24
24
  * @private
25
25
  * @author SAP SE
26
- * @version 1.135.0
26
+ * @version 1.136.0
27
27
  * @alias sap.ui.vk.measurement.Distance
28
28
  * @since 1.101.0
29
29
  */
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @param {float[]} [settings.edge] World coordinates of the edge ends in form <code>[x1, y1, z1, x2, y2, z2]</code>.
29
29
  * @private
30
30
  * @author SAP SE
31
- * @version 1.135.0
31
+ * @version 1.136.0
32
32
  * @alias sap.ui.vk.measurement.Edge
33
33
  * @since 1.101.0
34
34
  */
@@ -44,7 +44,7 @@ sap.ui.define([
44
44
  * where <code>e</code> is the number of edges in the list.
45
45
  * @private
46
46
  * @author SAP SE
47
- * @version 1.135.0
47
+ * @version 1.136.0
48
48
  * @alias sap.ui.vk.measurement.Face
49
49
  * @since 1.101.0
50
50
  */
@@ -27,7 +27,7 @@ sap.ui.define([
27
27
  * @abstract
28
28
  * @private
29
29
  * @author SAP SE
30
- * @version 1.135.0
30
+ * @version 1.136.0
31
31
  * @alias sap.ui.vk.measurement.Feature
32
32
  * @since 1.101.0
33
33
  */
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @param {float[]} [settings.vertex] World coordinates of the vertex in form <code>[x, y, z]</code>.
29
29
  * @private
30
30
  * @author SAP SE
31
- * @version 1.135.0
31
+ * @version 1.136.0
32
32
  * @alias sap.ui.vk.measurement.Vertex
33
33
  * @since 1.101.0
34
34
  */
@@ -43,7 +43,7 @@ sap.ui.define([
43
43
  * @param {object} [mSettings] Initial settings for the new ContentManager object.
44
44
  * @private
45
45
  * @author SAP SE
46
- * @version 1.135.0
46
+ * @version 1.136.0
47
47
  * @extends sap.ui.vk.ContentManager
48
48
  * @alias sap.ui.vk.pdf.ContentManager
49
49
  * @since 1.123.0
@@ -426,6 +426,9 @@ sap.ui.define([
426
426
  };
427
427
 
428
428
  PageGallery.prototype.onBeforeRendering = function() {
429
+ this._intersectionObserver?.disconnect();
430
+ this._intersectionObserver = null;
431
+
429
432
  this._unsubscribeFromEvents();
430
433
  };
431
434
 
@@ -463,11 +466,6 @@ sap.ui.define([
463
466
  this._subscribeToEvents();
464
467
  };
465
468
 
466
- PageGallery.prototype.onBeforeRendering = function() {
467
- this._intersectionObserver?.disconnect();
468
- this._intersectionObserver = null;
469
- };
470
-
471
469
  PageGallery.prototype._intersectionObserverCallback = function(entries) {
472
470
  const pages = this._getPagesControl().getItems();
473
471
  const visiblePages = this._visiblePages;