@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,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
|
+
});
|
package/src/sap/ui/vk/{tools/CrossSectionToolGizmoRenderer.js → ecad/LayersPanelRenderer.js}
RENAMED
|
@@ -10,10 +10,11 @@ sap.ui.define([
|
|
|
10
10
|
"use strict";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* LayersPanel renderer.
|
|
14
14
|
* @namespace
|
|
15
|
+
* @since 1.136.0
|
|
15
16
|
*/
|
|
16
|
-
var
|
|
17
|
+
var LayersPanelRenderer = {
|
|
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
|
+
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");
|
|
36
37
|
};
|
|
37
38
|
|
|
38
|
-
return
|
|
39
|
+
return LayersPanelRenderer;
|
|
39
40
|
|
|
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
|
package/src/sap/ui/vk/library.js
CHANGED
|
@@ -61,11 +61,12 @@ sap.ui.define([
|
|
|
61
61
|
* @namespace
|
|
62
62
|
* @name sap.ui.vk
|
|
63
63
|
* @author SAP SE
|
|
64
|
-
* @version 1.
|
|
64
|
+
* @version 1.136.0
|
|
65
65
|
* @public
|
|
66
66
|
*/
|
|
67
67
|
|
|
68
68
|
var vkLibrary = Library.init({
|
|
69
|
+
apiVersion: 2,
|
|
69
70
|
name: "sap.ui.vk",
|
|
70
71
|
dependencies: [
|
|
71
72
|
"sap.ui.core"
|
|
@@ -113,7 +114,8 @@ sap.ui.define([
|
|
|
113
114
|
"sap.ui.vk.tools.RotateToolGizmo",
|
|
114
115
|
"sap.ui.vk.tools.ScaleToolGizmo",
|
|
115
116
|
"sap.ui.vk.tools.SceneOrientationToolGizmo",
|
|
116
|
-
"sap.ui.vk.tools.TooltipToolGizmo"
|
|
117
|
+
"sap.ui.vk.tools.TooltipToolGizmo",
|
|
118
|
+
"sap.ui.vk.ecad.LayersPanel"
|
|
117
119
|
],
|
|
118
120
|
elements: [
|
|
119
121
|
"sap.ui.vk.ContentConnector",
|
|
@@ -145,7 +147,7 @@ sap.ui.define([
|
|
|
145
147
|
"sap.ui.vk.tools.PoiManipulationTool"
|
|
146
148
|
],
|
|
147
149
|
noLibraryCSS: false,
|
|
148
|
-
version: "1.
|
|
150
|
+
version: "1.136.0",
|
|
149
151
|
designtime: "sap/ui/vk/designtime/library.designtime"
|
|
150
152
|
});
|
|
151
153
|
|
|
@@ -181,6 +181,9 @@
|
|
|
181
181
|
if (info.data.uv) {
|
|
182
182
|
transferable.push(info.data.uv.buffer);
|
|
183
183
|
}
|
|
184
|
+
if (info.data.colors) {
|
|
185
|
+
transferable.push(info.data.colors.buffer);
|
|
186
|
+
}
|
|
184
187
|
enqueueCall({
|
|
185
188
|
sceneBuilderId: this.sceneBuilderId,
|
|
186
189
|
method: "setGeometry",
|
|
@@ -192,6 +195,7 @@
|
|
|
192
195
|
indices: info.data.index,
|
|
193
196
|
points: info.data.position,
|
|
194
197
|
normals: info.data.normal,
|
|
198
|
+
colors: info.data.colors,
|
|
195
199
|
uvs: info.data.uv
|
|
196
200
|
}
|
|
197
201
|
}]
|
|
@@ -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.
|
|
31
|
+
* @version 1.136.0
|
|
32
32
|
* @alias sap.ui.vk.measurement.Edge
|
|
33
33
|
* @since 1.101.0
|
|
34
34
|
*/
|
|
@@ -757,7 +757,7 @@ sap.ui.define([
|
|
|
757
757
|
formatters.set(precision, formatter);
|
|
758
758
|
}
|
|
759
759
|
|
|
760
|
-
var text = getResourceBundle().getText("MEASUREMENTS_ANGLE_VALUE", formatter.format(180 * angleValue / Math.PI));
|
|
760
|
+
var text = getResourceBundle().getText("MEASUREMENTS_ANGLE_VALUE", [formatter.format(180 * angleValue / Math.PI)]);
|
|
761
761
|
a = planeToScreen(viewport, camera, matrix, sampleCirclePoint(theta, radius));
|
|
762
762
|
updateDomText(domRef.children[5], domRef.children[4], text, a[0], a[1], null);
|
|
763
763
|
domRef.children[3].removeAttribute("visibility");
|
|
@@ -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.
|
|
31
|
+
* @version 1.136.0
|
|
32
32
|
* @alias sap.ui.vk.measurement.Vertex
|
|
33
33
|
* @since 1.101.0
|
|
34
34
|
*/
|