@sapui5/sap.ui.vk 1.134.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.
- package/package.json +1 -1
- package/src/sap/ui/vk/.library +1 -1
- package/src/sap/ui/vk/AnimationPlayback.js +1 -2
- package/src/sap/ui/vk/AnimationPlayer.js +1 -1
- package/src/sap/ui/vk/AnimationSequence.js +1 -5
- package/src/sap/ui/vk/AnimationTimeSlider.js +1 -2
- package/src/sap/ui/vk/AnimationTrack.js +2 -4
- package/src/sap/ui/vk/Annotation.js +1 -1
- 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 +1 -1
- package/src/sap/ui/vk/ContentManager.js +1 -1
- package/src/sap/ui/vk/ContentResource.js +9 -1
- package/src/sap/ui/vk/Core.js +1 -1
- package/src/sap/ui/vk/DownloadManager.js +1 -1
- package/src/sap/ui/vk/DrawerToolbar.js +1 -1
- package/src/sap/ui/vk/DvlException.js +1 -1
- package/src/sap/ui/vk/FlexibleControl.js +1 -1
- package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -1
- package/src/sap/ui/vk/Highlight.js +40 -318
- package/src/sap/ui/vk/ImageContentManager.js +1 -1
- package/src/sap/ui/vk/JointUtils.js +1 -2
- package/src/sap/ui/vk/LayerProxy.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 -2
- 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 +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 +1 -1
- package/src/sap/ui/vk/SafeArea.js +1 -1
- package/src/sap/ui/vk/Scene.js +1 -1
- package/src/sap/ui/vk/SceneTree.js +1 -1
- package/src/sap/ui/vk/StepNavigation.js +1 -1
- package/src/sap/ui/vk/Texture.js +1 -1
- package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
- package/src/sap/ui/vk/ToggleMenuItem.js +1 -1
- package/src/sap/ui/vk/Toolbar.js +1 -1
- package/src/sap/ui/vk/View.js +57 -75
- package/src/sap/ui/vk/ViewGallery.js +10 -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 +1 -5
- package/src/sap/ui/vk/ViewStateManagerBase.js +1 -3
- package/src/sap/ui/vk/Viewer.js +1 -131
- package/src/sap/ui/vk/Viewport.js +1 -1
- package/src/sap/ui/vk/ViewportBase.js +3 -1
- 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 +469 -0
- package/src/sap/ui/vk/{tools/AnchorPointToolGizmoRenderer.js → ecad/ElementsPanelRenderer.js} +13 -12
- package/src/sap/ui/vk/ecad/LayersPanel.js +440 -0
- package/src/sap/ui/vk/{tools/CrossSectionToolGizmoRenderer.js → ecad/LayersPanelRenderer.js} +13 -12
- package/src/sap/ui/vk/ecad/VisibilityType.js +31 -0
- package/src/sap/ui/vk/i18n/messagebundle.properties +50 -0
- package/src/sap/ui/vk/library.js +5 -3
- package/src/sap/ui/vk/matai/MataiLoaderWorker.js +4 -0
- 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/Surface.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 +1 -1
- 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 +2 -1
- package/src/sap/ui/vk/svg/HotspotHelper.js +2 -4
- 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 +1 -2
- package/src/sap/ui/vk/svg/ViewStateManager.js +1 -2
- package/src/sap/ui/vk/svg/Viewport.js +1 -1
- package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
- package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -2
- package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/threejs/Billboard.js +2 -3
- package/src/sap/ui/vk/threejs/Callout.js +1 -2
- package/src/sap/ui/vk/threejs/ContentDeliveryService.js +2 -1
- package/src/sap/ui/vk/threejs/ContentManager.js +1 -1
- package/src/sap/ui/vk/threejs/DetailView.js +1 -2
- package/src/sap/ui/vk/threejs/HighlightPlayer.js +18 -25
- package/src/sap/ui/vk/threejs/Material.js +1 -4
- package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/threejs/NodeProxy.js +7 -26
- package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/threejs/ParametricGenerators.js +1 -1
- package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -2
- package/src/sap/ui/vk/threejs/PolylineGeometry.js +29 -1
- package/src/sap/ui/vk/threejs/Scene.js +83 -76
- package/src/sap/ui/vk/threejs/SceneBuilder.js +8 -23
- package/src/sap/ui/vk/threejs/Texture.js +1 -4
- package/src/sap/ui/vk/threejs/ThreeExtensions.js +30 -75
- package/src/sap/ui/vk/threejs/ThreeUtils.js +1 -1
- package/src/sap/ui/vk/threejs/Thrustline.js +1 -4
- package/src/sap/ui/vk/threejs/ViewStateManager.js +7 -8
- package/src/sap/ui/vk/threejs/Viewport.js +1 -3
- package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +12 -29
- package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
- package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +11 -3
- package/src/sap/ui/vk/tools/AngleMeasurementToolGizmo.js +2 -1
- package/src/sap/ui/vk/tools/AreaMeasurementToolGizmo.js +2 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -7
- 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 +3 -2
- package/src/sap/ui/vk/tools/CreateParametricGizmo.js +3 -2
- package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +3 -2
- package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +3 -2
- package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +12 -1
- package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +11 -1
- package/src/sap/ui/vk/tools/DistanceMeasurementToolGizmo.js +2 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +3 -2
- package/src/sap/ui/vk/tools/ExplodeItemGroup.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeTool.js +3 -3
- package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +3 -2
- package/src/sap/ui/vk/tools/Gizmo.js +2 -5
- package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
- package/src/sap/ui/vk/tools/MeasurementToolGizmo.js +2 -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 +1 -1
- 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 +13 -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/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/tools/CreateTextToolGizmoRenderer.js +0 -41
- package/src/sap/ui/vk/tools/SceneOrientationToolGizmoRenderer.js +0 -39
|
@@ -0,0 +1,469 @@
|
|
|
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.ElementsPanel
|
|
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
|
+
"./ElementsPanelRenderer",
|
|
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
|
+
ElementsPanelRenderer,
|
|
57
|
+
VisibilityType,
|
|
58
|
+
getResourceBundle
|
|
59
|
+
) {
|
|
60
|
+
"use strict";
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Constructor for a new ElementsPanel.
|
|
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
|
+
* @private
|
|
76
|
+
* @alias sap.ui.vk.ecad.ElementsPanel
|
|
77
|
+
* @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
|
|
78
|
+
* @since 1.136.0
|
|
79
|
+
*/
|
|
80
|
+
var ElementsPanel = Control.extend("sap.ui.vk.ecad.ElementsPanel", /** @lends sap.ui.vk.ecad.ElementsPanel.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: ElementsPanelRenderer,
|
|
117
|
+
|
|
118
|
+
constructor: function(sId, mSettings) {
|
|
119
|
+
Control.apply(this, arguments);
|
|
120
|
+
vkCore.observeAssociations(this);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
var iconHidden = "sap-icon://hide";
|
|
125
|
+
var iconPartial = "sap-icon://hide";
|
|
126
|
+
var iconVisible = "sap-icon://show";
|
|
127
|
+
|
|
128
|
+
ElementsPanel.prototype.onSetViewStateManager = function(manager) {
|
|
129
|
+
this._manager = manager;
|
|
130
|
+
manager.attachVisibilityChanged(this._onVisibilityChanged, this);
|
|
131
|
+
this.refresh();
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
ElementsPanel.prototype.onUnsetViewStateManager = function(manager) {
|
|
135
|
+
this._manager = null;
|
|
136
|
+
manager.detachVisibilityChanged(this._onVisibilityChanged, this);
|
|
137
|
+
this.refresh();
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
ElementsPanel.prototype.onSetContentConnector = function(connector) {
|
|
141
|
+
connector.attachContentReplaced(this._onContentReplaced, this);
|
|
142
|
+
connector.attachContentChangesFinished(this._onContentChangesFinished, this);
|
|
143
|
+
this._setContent(connector.getContent());
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
ElementsPanel.prototype.onUnsetContentConnector = function(connector) {
|
|
147
|
+
this._setContent(null);
|
|
148
|
+
connector.detachContentReplaced(this._onContentReplaced, this);
|
|
149
|
+
connector.detachContentChangesFinished(this._onContentChangesFinished, this);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
ElementsPanel.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("ELEMENTS_PANEL_SHOW_BUTTON"),
|
|
163
|
+
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_SHOW_BUTTON_TOOLTIP"),
|
|
164
|
+
press: this._onShowElements.bind(this)
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
this._hideButton = new Button({
|
|
168
|
+
enabled: false,
|
|
169
|
+
iconFirst: true,
|
|
170
|
+
icon: iconHidden,
|
|
171
|
+
text: getResourceBundle().getText("ELEMENTS_PANEL_HIDE_BUTTON"),
|
|
172
|
+
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_HIDE_BUTTON_TOOLTIP"),
|
|
173
|
+
press: this._onHideElements.bind(this)
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
this._settingsButton = new Button({
|
|
177
|
+
icon: "sap-icon://settings",
|
|
178
|
+
tooltip: getResourceBundle().getText("ELEMENTS_PANEL_SETTINGS_BUTTON_TOOLTIP"),
|
|
179
|
+
press: this._onSettings.bind(this)
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
this._table = new Table({
|
|
183
|
+
mode: "MultiSelect",
|
|
184
|
+
sticky: [Sticky.HeaderToolbar, Sticky.ColumnHeaders],
|
|
185
|
+
selectionChange: this._onSelectionChanged.bind(this),
|
|
186
|
+
headerToolbar: new OverflowToolbar({
|
|
187
|
+
content: [
|
|
188
|
+
this._showButton,
|
|
189
|
+
this._hideButton,
|
|
190
|
+
new ToolbarSpacer(),
|
|
191
|
+
this._settingsButton
|
|
192
|
+
]
|
|
193
|
+
}),
|
|
194
|
+
columns: [
|
|
195
|
+
new Column({
|
|
196
|
+
hAlign: Library.TextAlign.Begin,
|
|
197
|
+
header: new Text({ text: getResourceBundle().getText("ELEMENTS_PANEL_NAME_COLUMN") })
|
|
198
|
+
|
|
199
|
+
}),
|
|
200
|
+
new Column({
|
|
201
|
+
hAlign: Library.TextAlign.Begin,
|
|
202
|
+
header: new Text({ text: getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COLUMN") })
|
|
203
|
+
}),
|
|
204
|
+
new Column({
|
|
205
|
+
hAlign: Library.TextAlign.Begin,
|
|
206
|
+
header: new Text({
|
|
207
|
+
text: getResourceBundle().getText("ELEMENTS_PANEL_DEVICE_REFERENCE_COLUMN")
|
|
208
|
+
})
|
|
209
|
+
}),
|
|
210
|
+
new Column({
|
|
211
|
+
hAlign: Library.TextAlign.Center,
|
|
212
|
+
header: new Text({ text: getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN") })
|
|
213
|
+
})
|
|
214
|
+
],
|
|
215
|
+
items: {
|
|
216
|
+
path: "/",
|
|
217
|
+
template: new ColumnListItem({
|
|
218
|
+
vAlign: "Middle",
|
|
219
|
+
cells: [
|
|
220
|
+
new Text({
|
|
221
|
+
text: "{refdes}"
|
|
222
|
+
}),
|
|
223
|
+
new Text({
|
|
224
|
+
text: {
|
|
225
|
+
path: "",
|
|
226
|
+
formatter: function(element) {
|
|
227
|
+
if (element.type === "2") {
|
|
228
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_COMPONENT");
|
|
229
|
+
} else if (element.type === "4") {
|
|
230
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_NET");
|
|
231
|
+
} else {
|
|
232
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_TYPE_UNKNOWN");
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}),
|
|
237
|
+
new Text({
|
|
238
|
+
text: "{deviceref}"
|
|
239
|
+
}),
|
|
240
|
+
new Icon({
|
|
241
|
+
src: {
|
|
242
|
+
path: "",
|
|
243
|
+
formatter: function(element) {
|
|
244
|
+
var type = that._getVisibility(element);
|
|
245
|
+
if (type === VisibilityType.Hidden) {
|
|
246
|
+
return iconHidden;
|
|
247
|
+
} else if (type === VisibilityType.Partial) {
|
|
248
|
+
return iconPartial;
|
|
249
|
+
}
|
|
250
|
+
return iconVisible;
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
tooltip: {
|
|
254
|
+
path: "",
|
|
255
|
+
formatter: function(element) {
|
|
256
|
+
var type = that._getVisibility(element);
|
|
257
|
+
if (type === VisibilityType.Hidden) {
|
|
258
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP");
|
|
259
|
+
} else if (type === VisibilityType.Partial) {
|
|
260
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP");
|
|
261
|
+
}
|
|
262
|
+
return getResourceBundle().getText("ELEMENTS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP");
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
})
|
|
266
|
+
]
|
|
267
|
+
})
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
this._scrollContainer = new ScrollContainer({
|
|
272
|
+
vertical: true,
|
|
273
|
+
horizontal: false,
|
|
274
|
+
height: "100%",
|
|
275
|
+
content: this._table
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
this.setAggregation("content", this._scrollContainer);
|
|
279
|
+
|
|
280
|
+
this._scene = null;
|
|
281
|
+
this._model = new JSONModel();
|
|
282
|
+
this._model.setSizeLimit(100000);
|
|
283
|
+
this._table.setModel(this._model);
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
ElementsPanel.prototype.refresh = function() {
|
|
287
|
+
if (!this._scene || !this._manager || !this._manager.getNodeHierarchy()) {
|
|
288
|
+
this._model.setData([]);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
// scan the tree and collect elements info
|
|
292
|
+
var elements = new Map();
|
|
293
|
+
this._scanTree(elements, this._manager.getNodeHierarchy().getSceneRef());
|
|
294
|
+
|
|
295
|
+
this._model.setData(elements.values().toArray());
|
|
296
|
+
this._table.setModel(this._model);
|
|
297
|
+
this.fireContentChanged();
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
ElementsPanel.prototype.onBeforeRendering = function() {
|
|
301
|
+
this._table.setVisible(true);
|
|
302
|
+
if (!this._resizeListenerId) {
|
|
303
|
+
this._resizeListenerId = ResizeHandler.register(this, this._handleResize.bind(this));
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
ElementsPanel.prototype._setScene = function(scene) {
|
|
308
|
+
this._scene = scene;
|
|
309
|
+
this.refresh();
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
ElementsPanel.prototype._getVisibility = function(element) {
|
|
313
|
+
return VisibilityType.Visible;
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
ElementsPanel.prototype._extractMetadata = function(metadata) {
|
|
317
|
+
if (metadata.length != undefined) {
|
|
318
|
+
var map = new Map();
|
|
319
|
+
metadata.forEach(function(entry) {
|
|
320
|
+
if (entry.category === "ecad") {
|
|
321
|
+
map.set(entry.tag, entry.value);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
return map;
|
|
325
|
+
}
|
|
326
|
+
return null;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
ElementsPanel.prototype._addElement = function(elements, metadata, nodeRef, nodeVisibility) {
|
|
330
|
+
var type = metadata.get("type");
|
|
331
|
+
var refdes = metadata.get("refdes");
|
|
332
|
+
var deviceref = metadata.get("deviceref");
|
|
333
|
+
|
|
334
|
+
var element = elements.get(refdes);
|
|
335
|
+
if (!element) {
|
|
336
|
+
element = {
|
|
337
|
+
refdes: refdes,
|
|
338
|
+
type: type,
|
|
339
|
+
deviceref: deviceref,
|
|
340
|
+
elements: new Map(),
|
|
341
|
+
hiddenElements: 0
|
|
342
|
+
};
|
|
343
|
+
elements.set(refdes, element);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
if (nodeVisibility == false) {
|
|
347
|
+
// layer.hiddenElements++;
|
|
348
|
+
}
|
|
349
|
+
element.elements.set(nodeRef.uid, nodeRef);
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
ElementsPanel.prototype._scanTree = function(elements, nodeRef) {
|
|
353
|
+
var hierarchy = this._manager.getNodeHierarchy();
|
|
354
|
+
var node = hierarchy.createNodeProxy(nodeRef);
|
|
355
|
+
var metadata = this._extractMetadata(node.getNodeMetadata());
|
|
356
|
+
hierarchy.destroyNodeProxy(node);
|
|
357
|
+
|
|
358
|
+
if (metadata) {
|
|
359
|
+
var name = metadata.get("refdes");
|
|
360
|
+
if (name) {
|
|
361
|
+
this._addElement(elements, metadata, nodeRef, this._manager.getVisibilityState(nodeRef));
|
|
362
|
+
return; // don't go further down the hierarchy
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
hierarchy.getChildren(nodeRef).forEach(function(ref) {
|
|
367
|
+
this._scanTree(elements, ref);
|
|
368
|
+
}, this);
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
ElementsPanel.prototype._onSelectionChanged = function(event) {
|
|
372
|
+
this._updateButtons();
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
ElementsPanel.prototype._onVisibilityChanged = function(event) {
|
|
376
|
+
//
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
ElementsPanel.prototype._handleResize = function(event) {
|
|
380
|
+
// this._updateSelection();
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
ElementsPanel.prototype._setContent = function(content) {
|
|
384
|
+
// If there is no explicitly assigned view state manager then use the content connector's default one.
|
|
385
|
+
if (content && !this.getViewStateManager()) {
|
|
386
|
+
var connector = Element.getElementById(this.getContentConnector());
|
|
387
|
+
if (connector) {
|
|
388
|
+
var defaultManager = connector.getDefaultViewStateManager();
|
|
389
|
+
if (defaultManager) {
|
|
390
|
+
this.setViewStateManager(defaultManager);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
this._setScene(content);
|
|
395
|
+
return this;
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
ElementsPanel.prototype._onContentReplaced = function(event) {
|
|
399
|
+
this._setContent(event.getParameter("newContent"));
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
ElementsPanel.prototype._onContentChangesFinished = function(event) {
|
|
403
|
+
this.refresh();
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
ElementsPanel.prototype._updateButtons = function() {
|
|
407
|
+
var canShow = false, canHide = false;
|
|
408
|
+
var selected = this._table.getSelectedItems();
|
|
409
|
+
|
|
410
|
+
selected.forEach(function(item) {
|
|
411
|
+
var element = item.getBindingContext().getObject();
|
|
412
|
+
var visibility = this._getVisibility(element);
|
|
413
|
+
|
|
414
|
+
if (visibility === VisibilityType.Visible) {
|
|
415
|
+
canHide = true;
|
|
416
|
+
} else if (visibility === VisibilityType.Hidden) {
|
|
417
|
+
canShow = true;
|
|
418
|
+
} else {
|
|
419
|
+
canHide = canShow = true;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
}, this);
|
|
423
|
+
|
|
424
|
+
this._showButton.setEnabled(canShow);
|
|
425
|
+
this._hideButton.setEnabled(canHide);
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
ElementsPanel.prototype._onShowElements = function() {
|
|
429
|
+
var toShow = [];
|
|
430
|
+
var selected = this._table.getSelectedItems();
|
|
431
|
+
|
|
432
|
+
selected.forEach(function(item) {
|
|
433
|
+
var layer = item.getBindingContext().getObject();
|
|
434
|
+
if (layer.hiddenElements !== 0) {
|
|
435
|
+
layer.hiddenElements = 0;
|
|
436
|
+
layer.elements.forEach(function(nodeRef) {
|
|
437
|
+
toShow.push(nodeRef);
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
this._manager.setVisibilityState(toShow, true, true, true);
|
|
442
|
+
this._model.updateBindings(true);
|
|
443
|
+
this._updateButtons();
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
ElementsPanel.prototype._onHideElements = function() {
|
|
447
|
+
var toHide = [];
|
|
448
|
+
var selected = this._table.getSelectedItems();
|
|
449
|
+
|
|
450
|
+
selected.forEach(function(item) {
|
|
451
|
+
var layer = item.getBindingContext().getObject();
|
|
452
|
+
if (layer.hiddenElements !== layer.elements.size) {
|
|
453
|
+
layer.hiddenElements = layer.elements.size;
|
|
454
|
+
layer.elements.forEach(function(nodeRef) {
|
|
455
|
+
toHide.push(nodeRef);
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
this._manager.setVisibilityState(toHide, false, true, true);
|
|
460
|
+
this._model.updateBindings(true);
|
|
461
|
+
this._updateButtons();
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
ElementsPanel.prototype._onSettings = function() {
|
|
465
|
+
//
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
return ElementsPanel;
|
|
469
|
+
});
|
package/src/sap/ui/vk/{tools/AnchorPointToolGizmoRenderer.js → ecad/ElementsPanelRenderer.js}
RENAMED
|
@@ -10,10 +10,11 @@ sap.ui.define([
|
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* ElementsPanel renderer.
|
|
14
14
|
* @namespace
|
|
15
|
+
* @since 1.136.0
|
|
15
16
|
*/
|
|
16
|
-
var
|
|
17
|
+
var ElementsPanelRenderer = {
|
|
17
18
|
apiVersion: 2
|
|
18
19
|
};
|
|
19
20
|
|
|
@@ -21,20 +22,20 @@ sap.ui.define([
|
|
|
21
22
|
* Renders the HTML for the given control, using the provided
|
|
22
23
|
* {@link sap.ui.core.RenderManager}.
|
|
23
24
|
*
|
|
24
|
-
* @param {sap.ui.core.RenderManager}
|
|
25
|
+
* @param {sap.ui.core.RenderManager} oRm
|
|
25
26
|
* the RenderManager that can be used for writing to
|
|
26
27
|
* the Render-Output-Buffer
|
|
27
|
-
* @param {sap.ui.core.Control}
|
|
28
|
+
* @param {sap.ui.core.Control} oControl
|
|
28
29
|
* the control to be rendered
|
|
29
30
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
ElementsPanelRenderer.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");
|
|
36
37
|
};
|
|
37
38
|
|
|
38
|
-
return
|
|
39
|
+
return ElementsPanelRenderer;
|
|
39
40
|
|
|
40
|
-
}
|
|
41
|
+
});
|