@sapui5/sap.ui.vk 1.136.1 → 1.139.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 +9 -1
- package/src/sap/ui/vk/AnimationPlayback.js +1 -1
- package/src/sap/ui/vk/AnimationPlayer.js +2 -2
- package/src/sap/ui/vk/AnimationSequence.js +1 -1
- package/src/sap/ui/vk/AnimationTimeSlider.js +1 -1
- package/src/sap/ui/vk/AnimationTrack.js +1 -1
- package/src/sap/ui/vk/Annotation.js +2 -2
- package/src/sap/ui/vk/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/Camera.js +1 -1
- package/src/sap/ui/vk/ContentConnector.js +19 -15
- package/src/sap/ui/vk/ContentManager.js +1 -1
- package/src/sap/ui/vk/ContentResource.js +3 -2
- package/src/sap/ui/vk/ContentType.js +1 -1
- package/src/sap/ui/vk/Core.js +1 -3
- package/src/sap/ui/vk/DownloadManager.js +1 -1
- package/src/sap/ui/vk/DrawerToolbar.js +152 -19
- package/src/sap/ui/vk/DrawerToolbarButton.js +12 -1
- package/src/sap/ui/vk/DvlException.js +1 -1
- package/src/sap/ui/vk/FlexibleControl.js +1 -2
- package/src/sap/ui/vk/FlexibleControlLayoutData.js +1 -2
- package/src/sap/ui/vk/Highlight.js +1 -1
- package/src/sap/ui/vk/ImageContentManager.js +1 -1
- package/src/sap/ui/vk/JointUtils.js +1 -1
- package/src/sap/ui/vk/LayerProxy.js +1 -1
- package/src/sap/ui/vk/LegendItem.js +1 -1
- package/src/sap/ui/vk/ListPanel.js +1 -1
- package/src/sap/ui/vk/ListPanelStack.js +1 -1
- package/src/sap/ui/vk/Loco.js +1 -1
- package/src/sap/ui/vk/Material.js +1 -1
- package/src/sap/ui/vk/NativeViewport.js +1 -1
- package/src/sap/ui/vk/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/NodeProxy.js +1 -1
- package/src/sap/ui/vk/NodeUtils.js +1 -1
- package/src/sap/ui/vk/Notifications.js +1 -1
- package/src/sap/ui/vk/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/OutputSettings.js +0 -1
- package/src/sap/ui/vk/Overlay.js +1 -1
- package/src/sap/ui/vk/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/ProgressIndicator.js +1 -1
- package/src/sap/ui/vk/RedlineCollaboration.js +1 -1
- package/src/sap/ui/vk/RedlineConversation.js +1 -1
- package/src/sap/ui/vk/RedlineDesign.js +1 -1
- package/src/sap/ui/vk/RedlineElement.js +1 -1
- package/src/sap/ui/vk/RedlineElementComment.js +1 -1
- package/src/sap/ui/vk/RedlineElementEllipse.js +1 -1
- package/src/sap/ui/vk/RedlineElementFreehand.js +1 -1
- package/src/sap/ui/vk/RedlineElementLine.js +1 -1
- package/src/sap/ui/vk/RedlineElementRectangle.js +1 -1
- package/src/sap/ui/vk/RedlineElementText.js +1 -1
- package/src/sap/ui/vk/RedlineSurface.js +2 -2
- package/src/sap/ui/vk/SafeArea.js +1 -1
- package/src/sap/ui/vk/Scene.js +16 -1
- package/src/sap/ui/vk/SceneTree.js +23 -9
- package/src/sap/ui/vk/StepNavigation.js +1 -2
- package/src/sap/ui/vk/Texture.js +2 -2
- package/src/sap/ui/vk/ToggleMenuButton.js +1 -1
- package/src/sap/ui/vk/ToggleMenuItem.js +7 -4
- package/src/sap/ui/vk/ToggleMenuItemRenderer.js +224 -0
- package/src/sap/ui/vk/Toolbar.js +62 -100
- package/src/sap/ui/vk/View.js +7 -13
- package/src/sap/ui/vk/ViewGallery.js +2 -2
- package/src/sap/ui/vk/ViewGalleryThumbnail.js +1 -1
- package/src/sap/ui/vk/ViewGroup.js +1 -1
- package/src/sap/ui/vk/ViewManager.js +1 -1
- package/src/sap/ui/vk/ViewStateManager.js +4 -11
- package/src/sap/ui/vk/ViewStateManagerBase.js +4 -4
- package/src/sap/ui/vk/Viewer.js +408 -234
- package/src/sap/ui/vk/Viewport.js +2 -2
- package/src/sap/ui/vk/ViewportBase.js +24 -70
- 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 +627 -132
- package/src/sap/ui/vk/ecad/LayersPanel.js +247 -131
- package/src/sap/ui/vk/i18n/messagebundle.properties +70 -38
- package/src/sap/ui/vk/i18n/messagebundle_ar.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_bg.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ca.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_cnr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_cs.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_cy.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_da.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_de.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_el.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_en.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_en_GB.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_en_US_saprigi.properties +31 -12
- package/src/sap/ui/vk/i18n/messagebundle_es.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_es_MX.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_et.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_fi.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_fr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_fr_CA.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_hi.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_hr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_hu.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_id.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_it.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_iw.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ja.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_kk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ko.properties +27 -9
- package/src/sap/ui/vk/i18n/messagebundle_lt.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_lv.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_mk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ms.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_nl.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_no.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_pl.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_pt.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_pt_PT.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ro.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_ru.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sh.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sl.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_sv.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_th.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_tr.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_uk.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_vi.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_zh_CN.properties +30 -12
- package/src/sap/ui/vk/i18n/messagebundle_zh_TW.properties +30 -12
- package/src/sap/ui/vk/library.js +7 -4
- package/src/sap/ui/vk/measurements/Angle.js +1 -1
- package/src/sap/ui/vk/measurements/Area.js +1 -1
- package/src/sap/ui/vk/measurements/Distance.js +1 -1
- package/src/sap/ui/vk/measurements/Edge.js +1 -1
- package/src/sap/ui/vk/measurements/Face.js +1 -1
- package/src/sap/ui/vk/measurements/Feature.js +1 -1
- package/src/sap/ui/vk/measurements/Vertex.js +1 -1
- package/src/sap/ui/vk/pdf/ContentManager.js +1 -1
- package/src/sap/ui/vk/pdf/Page.js +9 -10
- package/src/sap/ui/vk/pdf/Utils.js +4 -2
- package/src/sap/ui/vk/pdf/Viewport.js +5 -8
- package/src/sap/ui/vk/svg/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/svg/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/svg/ContentManager.js +2 -1
- package/src/sap/ui/vk/svg/HotspotHelper.js +2 -2
- package/src/sap/ui/vk/svg/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/svg/NodeProxy.js +1 -1
- package/src/sap/ui/vk/svg/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/svg/Scene.js +1 -1
- package/src/sap/ui/vk/svg/SceneBuilder.js +12 -4
- package/src/sap/ui/vk/svg/ViewStateManager.js +2 -2
- package/src/sap/ui/vk/svg/Viewport.js +192 -2
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.8.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.8.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_belize_base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_bluecrystal_base/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_hcb/library.source.less +1 -1
- package/src/sap/ui/vk/themes/sap_horizon/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_dark/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_hcb/library.source.less +0 -5
- package/src/sap/ui/vk/themes/sap_horizon_hcw/library.source.less +0 -5
- package/src/sap/ui/vk/thirdparty/pdf.worker.js +1 -1
- package/src/sap/ui/vk/threejs/AnimationHelper.js +1 -1
- package/src/sap/ui/vk/threejs/BaseNodeProxy.js +1 -1
- package/src/sap/ui/vk/threejs/Billboard.js +23 -11
- package/src/sap/ui/vk/threejs/Callout.js +11 -1
- package/src/sap/ui/vk/threejs/ContentDeliveryService.js +1 -1
- package/src/sap/ui/vk/threejs/ContentManager.js +3 -2
- package/src/sap/ui/vk/threejs/DetailView.js +1 -1
- package/src/sap/ui/vk/threejs/HighlightPlayer.js +14 -22
- package/src/sap/ui/vk/threejs/Material.js +2 -2
- package/src/sap/ui/vk/threejs/NodeHierarchy.js +1 -1
- package/src/sap/ui/vk/threejs/NodeProxy.js +9 -11
- package/src/sap/ui/vk/threejs/OrthographicCamera.js +1 -1
- package/src/sap/ui/vk/threejs/OutlineRenderer.js +4 -10
- package/src/sap/ui/vk/threejs/PerspectiveCamera.js +1 -1
- package/src/sap/ui/vk/threejs/PointCloudGroup.js +1 -1
- package/src/sap/ui/vk/threejs/Scene.js +1 -15
- package/src/sap/ui/vk/threejs/SceneBuilder.js +17 -4
- package/src/sap/ui/vk/threejs/Texture.js +2 -2
- package/src/sap/ui/vk/threejs/ThreeExtensions.js +10 -174
- package/src/sap/ui/vk/threejs/ThreeUtils.js +7 -18
- package/src/sap/ui/vk/threejs/Thrustline.js +1 -1
- package/src/sap/ui/vk/threejs/ViewStateManager.js +752 -447
- package/src/sap/ui/vk/threejs/Viewport.js +43 -33
- package/src/sap/ui/vk/tools/AnchorPointTool.js +1 -1
- package/src/sap/ui/vk/tools/AnchorPointToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationTool.js +1 -1
- package/src/sap/ui/vk/tools/AxisAngleRotationToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateEllipseTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateEllipseToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateParametricGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathTool.js +1 -1
- package/src/sap/ui/vk/tools/CreatePathToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateRectangleToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextTool.js +1 -1
- package/src/sap/ui/vk/tools/CreateTextToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionTool.js +1 -1
- package/src/sap/ui/vk/tools/CrossSectionToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/DuplicateSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeItemGroup.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeTool.js +1 -1
- package/src/sap/ui/vk/tools/ExplodeToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Gizmo.js +1 -1
- package/src/sap/ui/vk/tools/HitTestTool.js +1 -1
- package/src/sap/ui/vk/tools/MoveTool.js +1 -1
- package/src/sap/ui/vk/tools/MoveToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/PointCloudSelectionTool.js +2 -2
- package/src/sap/ui/vk/tools/PointCloudSelectionToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RectSelectTool.js +1 -1
- package/src/sap/ui/vk/tools/RedlineTool.js +1 -1
- package/src/sap/ui/vk/tools/RedlineToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RotateOrbitTool.js +1 -1
- package/src/sap/ui/vk/tools/RotateTool.js +1 -1
- package/src/sap/ui/vk/tools/RotateToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/RotateTurntableTool.js +1 -1
- package/src/sap/ui/vk/tools/ScaleTool.js +1 -1
- package/src/sap/ui/vk/tools/ScaleToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/SceneOrientationTool.js +1 -1
- package/src/sap/ui/vk/tools/SceneOrientationToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/Tool.js +1 -1
- package/src/sap/ui/vk/tools/TooltipTool.js +1 -1
- package/src/sap/ui/vk/tools/TooltipToolGizmo.js +1 -1
- package/src/sap/ui/vk/tools/TooltipToolHandler.js +5 -0
- package/src/sap/ui/vk/tools/TransformSvgElementTool.js +1 -1
- package/src/sap/ui/vk/tools/TransformSvgElementToolGizmo.js +1 -1
- package/src/sap/ui/vk/totara/TotaraLoader.js +5 -1
- package/src/sap/ui/vk/ve/matai.js +1 -1
- package/src/sap/ui/vk/ve/matai.wasm +0 -0
- package/ui5.yaml +5 -3
- package/src/sap/ui/vk/ToolbarRenderer.js +0 -41
- package/src/sap/ui/vk/ViewerRenderer.js +0 -48
- package/src/sap/ui/vk/ecad/ElementsPanelRenderer.js +0 -41
- package/src/sap/ui/vk/ecad/LayersPanelRenderer.js +0 -41
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-bold-v1.4.woff2 +0 -0
- package/src/sap/ui/vk/themes/base/fonts/SAP-VE-icons-regular-v1.4.woff2 +0 -0
- package/src/sap/ui/vk/threejs/v2/ViewStateManager.js +0 -1445
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
(c) Copyright 2009-2015 SAP SE. All rights reserved
|
|
5
|
-
|
|
2
|
+
* ${c\pyright}
|
|
6
3
|
*/
|
|
7
4
|
|
|
8
5
|
// Provides control sap.ui.vk.ecad.LayerPanel
|
|
@@ -12,53 +9,45 @@ sap.ui.define([
|
|
|
12
9
|
"sap/m/OverflowToolbar",
|
|
13
10
|
"sap/m/ToolbarLayoutData",
|
|
14
11
|
"sap/m/ToolbarSpacer",
|
|
15
|
-
"sap/m/
|
|
12
|
+
"sap/m/Label",
|
|
16
13
|
"sap/m/Table",
|
|
17
14
|
"sap/m/Column",
|
|
18
|
-
"sap/m/Sticky",
|
|
19
|
-
"sap/m/ScrollContainer",
|
|
20
15
|
"sap/m/ColumnListItem",
|
|
21
|
-
"sap/
|
|
16
|
+
"sap/m/plugins/ColumnResizer",
|
|
22
17
|
"sap/ui/core/Control",
|
|
23
18
|
"sap/ui/core/Element",
|
|
24
19
|
"sap/ui/core/Icon",
|
|
25
20
|
"sap/ui/core/library",
|
|
26
|
-
"sap/ui/core/ResizeHandler",
|
|
27
21
|
"sap/ui/model/json/JSONModel",
|
|
28
22
|
"../Core",
|
|
29
|
-
"../library",
|
|
30
|
-
"../ViewStateManager",
|
|
31
|
-
"./LayersPanelRenderer",
|
|
32
23
|
"./VisibilityType",
|
|
33
|
-
"../getResourceBundle"
|
|
24
|
+
"../getResourceBundle",
|
|
25
|
+
"sap/m/library"
|
|
34
26
|
], function(
|
|
35
27
|
Button,
|
|
36
28
|
SearchField,
|
|
37
29
|
OverflowToolbar,
|
|
38
30
|
ToolbarLayoutData,
|
|
39
31
|
ToolbarSpacer,
|
|
40
|
-
|
|
32
|
+
Label,
|
|
41
33
|
Table,
|
|
42
34
|
Column,
|
|
43
|
-
Sticky,
|
|
44
|
-
ScrollContainer,
|
|
45
35
|
ColumnListItem,
|
|
46
|
-
|
|
36
|
+
ColumnResizer,
|
|
47
37
|
Control,
|
|
48
38
|
Element,
|
|
49
39
|
Icon,
|
|
50
40
|
Library,
|
|
51
|
-
ResizeHandler,
|
|
52
41
|
JSONModel,
|
|
53
42
|
vkCore,
|
|
54
|
-
vkLibrary,
|
|
55
|
-
ViewStateManager,
|
|
56
|
-
LayersPanelRenderer,
|
|
57
43
|
VisibilityType,
|
|
58
|
-
getResourceBundle
|
|
44
|
+
getResourceBundle,
|
|
45
|
+
SapMLibrary
|
|
59
46
|
) {
|
|
60
47
|
"use strict";
|
|
61
48
|
|
|
49
|
+
const Sticky = SapMLibrary.Sticky;
|
|
50
|
+
|
|
62
51
|
/**
|
|
63
52
|
* Constructor for a new LayersPanel.
|
|
64
53
|
*
|
|
@@ -69,7 +58,7 @@ sap.ui.define([
|
|
|
69
58
|
* @extends sap.ui.core.Control
|
|
70
59
|
*
|
|
71
60
|
* @author SAP SE
|
|
72
|
-
* @version 1.
|
|
61
|
+
* @version 1.139.0
|
|
73
62
|
*
|
|
74
63
|
* @constructor
|
|
75
64
|
* @public
|
|
@@ -80,9 +69,19 @@ sap.ui.define([
|
|
|
80
69
|
var LayersPanel = Control.extend("sap.ui.vk.ecad.LayersPanel", /** @lends sap.ui.vk.ecad.LayersPanel.prototype */ {
|
|
81
70
|
metadata: {
|
|
82
71
|
library: "sap.ui.vk",
|
|
72
|
+
properties: {
|
|
73
|
+
width: {
|
|
74
|
+
type: "sap.ui.core.CSSSize",
|
|
75
|
+
defaultValue: "auto"
|
|
76
|
+
},
|
|
77
|
+
height: {
|
|
78
|
+
type: "sap.ui.core.CSSSize",
|
|
79
|
+
defaultValue: "100%"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
83
82
|
aggregations: {
|
|
84
83
|
content: {
|
|
85
|
-
type: "sap.m.
|
|
84
|
+
type: "sap.m.Table",
|
|
86
85
|
multiple: false
|
|
87
86
|
}
|
|
88
87
|
},
|
|
@@ -112,19 +111,40 @@ sap.ui.define([
|
|
|
112
111
|
}
|
|
113
112
|
}
|
|
114
113
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
renderer: {
|
|
115
|
+
apiVersion: 2,
|
|
116
|
+
render: function(oRm, oControl) {
|
|
117
|
+
oRm.openStart("div", oControl);
|
|
118
|
+
oRm.class("sapUiSizeCompact");
|
|
119
|
+
const width = oControl.getWidth();
|
|
120
|
+
if (width != null) {
|
|
121
|
+
oRm.style("width", width);
|
|
122
|
+
}
|
|
123
|
+
const height = oControl.getHeight();
|
|
124
|
+
if (height != null) {
|
|
125
|
+
oRm.style("height", height);
|
|
126
|
+
}
|
|
127
|
+
oRm.openEnd();
|
|
128
|
+
oRm.renderControl(oControl.getAggregation("content"));
|
|
129
|
+
oRm.close("div");
|
|
130
|
+
}
|
|
131
|
+
},
|
|
118
132
|
constructor: function(sId, mSettings) {
|
|
119
133
|
Control.apply(this, arguments);
|
|
120
134
|
vkCore.observeAssociations(this);
|
|
121
135
|
}
|
|
122
136
|
});
|
|
123
137
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
138
|
+
const IconType = {
|
|
139
|
+
Hidden: "sap-icon://status-inactive",
|
|
140
|
+
Partial: "sap-icon://vk-icons/partially-visible-layer",
|
|
141
|
+
Visible: "sap-icon://rhombus-milestone-2"
|
|
142
|
+
};
|
|
127
143
|
|
|
144
|
+
const ElementType = {
|
|
145
|
+
Component: "2",
|
|
146
|
+
Net: "4"
|
|
147
|
+
};
|
|
128
148
|
LayersPanel.prototype.onSetViewStateManager = function(manager) {
|
|
129
149
|
this._manager = manager;
|
|
130
150
|
manager.attachVisibilityChanged(this._onVisibilityChanged, this);
|
|
@@ -153,12 +173,21 @@ sap.ui.define([
|
|
|
153
173
|
if (Control.prototype.init) {
|
|
154
174
|
Control.prototype.init.apply(this);
|
|
155
175
|
}
|
|
156
|
-
|
|
176
|
+
const that = this;
|
|
177
|
+
|
|
178
|
+
this._searchField = new SearchField({
|
|
179
|
+
layoutData: new ToolbarLayoutData({
|
|
180
|
+
shrinkable: true,
|
|
181
|
+
maxWidth: "400px"
|
|
182
|
+
}),
|
|
183
|
+
search: function(event) {
|
|
184
|
+
that._onSearch.call(that, event.getParameter("query"));
|
|
185
|
+
}
|
|
186
|
+
});
|
|
157
187
|
|
|
158
188
|
this._showButton = new Button({
|
|
159
189
|
enabled: false,
|
|
160
|
-
|
|
161
|
-
icon: iconVisible,
|
|
190
|
+
icon: IconType.Visible,
|
|
162
191
|
text: getResourceBundle().getText("LAYERS_PANEL_SHOW_BUTTON"),
|
|
163
192
|
tooltip: getResourceBundle().getText("LAYERS_PANEL_SHOW_BUTTON_TOOLTIP"),
|
|
164
193
|
press: this._onShowLayers.bind(this)
|
|
@@ -166,8 +195,7 @@ sap.ui.define([
|
|
|
166
195
|
|
|
167
196
|
this._hideButton = new Button({
|
|
168
197
|
enabled: false,
|
|
169
|
-
|
|
170
|
-
icon: iconHidden,
|
|
198
|
+
icon: IconType.Hidden,
|
|
171
199
|
text: getResourceBundle().getText("LAYERS_PANEL_HIDE_BUTTON"),
|
|
172
200
|
tooltip: getResourceBundle().getText("LAYERS_PANEL_HIDE_BUTTON_TOOLTIP"),
|
|
173
201
|
press: this._onHideLayers.bind(this)
|
|
@@ -175,35 +203,34 @@ sap.ui.define([
|
|
|
175
203
|
|
|
176
204
|
this._table = new Table({
|
|
177
205
|
mode: "MultiSelect",
|
|
206
|
+
includeItemInSelection: true,
|
|
207
|
+
noDataText: getResourceBundle().getText("LAYERS_PANEL_NO_DATA"),
|
|
178
208
|
sticky: [Sticky.HeaderToolbar, Sticky.ColumnHeaders],
|
|
179
209
|
selectionChange: this._onSelectionChanged.bind(this),
|
|
180
210
|
headerToolbar: new OverflowToolbar({
|
|
181
211
|
content: [
|
|
182
|
-
|
|
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
|
-
}),
|
|
212
|
+
this._searchField,
|
|
191
213
|
new ToolbarSpacer(),
|
|
192
214
|
this._showButton,
|
|
193
215
|
this._hideButton
|
|
194
216
|
]
|
|
195
217
|
}),
|
|
218
|
+
dependents: [
|
|
219
|
+
new ColumnResizer({
|
|
220
|
+
columnResize: that._onColumnResize.bind(this)
|
|
221
|
+
})
|
|
222
|
+
],
|
|
196
223
|
columns: [
|
|
197
224
|
new Column({
|
|
198
225
|
minScreenWidth: "10rem",
|
|
199
226
|
hAlign: Library.TextAlign.Begin,
|
|
200
|
-
header: new
|
|
227
|
+
header: new Label({ text: getResourceBundle().getText("LAYERS_PANEL_NAME_COLUMN") })
|
|
201
228
|
|
|
202
229
|
}),
|
|
203
230
|
new Column({
|
|
204
231
|
minScreenWidth: "6rem",
|
|
205
232
|
hAlign: Library.TextAlign.Center,
|
|
206
|
-
header: new
|
|
233
|
+
header: new Label({ text: getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN") })
|
|
207
234
|
})
|
|
208
235
|
],
|
|
209
236
|
items: {
|
|
@@ -211,32 +238,34 @@ sap.ui.define([
|
|
|
211
238
|
template: new ColumnListItem({
|
|
212
239
|
vAlign: "Middle",
|
|
213
240
|
cells: [
|
|
214
|
-
new
|
|
241
|
+
new Label({
|
|
215
242
|
text: "{name}"
|
|
216
243
|
}),
|
|
217
244
|
new Icon({
|
|
218
245
|
src: {
|
|
219
246
|
path: "",
|
|
220
247
|
formatter: function(layer) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
248
|
+
switch (that._getVisibility(layer)) {
|
|
249
|
+
case VisibilityType.Hidden:
|
|
250
|
+
return IconType.Hidden;
|
|
251
|
+
case VisibilityType.Partial:
|
|
252
|
+
return IconType.Partial;
|
|
253
|
+
default:
|
|
254
|
+
return IconType.Visible;
|
|
226
255
|
}
|
|
227
|
-
return iconVisible;
|
|
228
256
|
}
|
|
229
257
|
},
|
|
230
258
|
tooltip: {
|
|
231
259
|
path: "",
|
|
232
260
|
formatter: function(layer) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
261
|
+
switch (that._getVisibility(layer)) {
|
|
262
|
+
case VisibilityType.Hidden:
|
|
263
|
+
return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_HIDDEN_TOOLTIP");
|
|
264
|
+
case VisibilityType.Partial:
|
|
265
|
+
return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_PARTIAL_TOOLTIP");
|
|
266
|
+
default:
|
|
267
|
+
return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP");
|
|
238
268
|
}
|
|
239
|
-
return getResourceBundle().getText("LAYERS_PANEL_VISIBLE_COLUMN_VISIBLE_TOOLTIP");
|
|
240
269
|
}
|
|
241
270
|
}
|
|
242
271
|
})
|
|
@@ -245,58 +274,90 @@ sap.ui.define([
|
|
|
245
274
|
}
|
|
246
275
|
});
|
|
247
276
|
|
|
248
|
-
this.
|
|
249
|
-
vertical: true,
|
|
250
|
-
horizontal: false,
|
|
251
|
-
height: "100%",
|
|
252
|
-
content: this._table
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
this.setAggregation("content", this._scrollContainer);
|
|
277
|
+
this.setAggregation("content", this._table);
|
|
256
278
|
|
|
257
279
|
this._scene = null;
|
|
258
280
|
this._model = new JSONModel();
|
|
259
281
|
this._table.setModel(this._model);
|
|
282
|
+
this._skipEvent = false;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
LayersPanel.prototype.exit = function() {
|
|
286
|
+
this._model.destroy();
|
|
287
|
+
this._model = null;
|
|
288
|
+
|
|
289
|
+
Control.prototype.exit?.apply(this);
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
LayersPanel.prototype.getControl = function() {
|
|
293
|
+
return this._table;
|
|
260
294
|
};
|
|
261
295
|
|
|
262
296
|
LayersPanel.prototype.refresh = function() {
|
|
263
|
-
if (!this._scene || !this._manager
|
|
264
|
-
|
|
297
|
+
if (!this._scene || !this._manager) {
|
|
298
|
+
// This method may be called indirectly from the exit method after _model is destroyed
|
|
299
|
+
this._model?.setData([]);
|
|
265
300
|
return;
|
|
266
301
|
}
|
|
267
302
|
// scan the tree and collect layers info
|
|
268
|
-
|
|
269
|
-
|
|
303
|
+
this._initialLayerIndex = 1;
|
|
304
|
+
const layers = new Map();
|
|
305
|
+
this._scanTree(layers, this._scene.getRootElement());
|
|
306
|
+
|
|
307
|
+
// get layer index info from scene metadata
|
|
308
|
+
const indices = this._extractLayersIndex();
|
|
309
|
+
|
|
310
|
+
indices.forEach(function(index, name) {
|
|
311
|
+
const layer = layers.get(name);
|
|
312
|
+
if (layer) {
|
|
313
|
+
layer.index = +index;
|
|
314
|
+
}
|
|
315
|
+
}, this);
|
|
270
316
|
|
|
271
|
-
|
|
317
|
+
const data = layers.values().toArray();
|
|
318
|
+
data.sort((a, b) => a.index - b.index);
|
|
319
|
+
this._model.setSizeLimit(data.length);
|
|
320
|
+
this._model.setData(data);
|
|
272
321
|
this._table.setModel(this._model);
|
|
273
|
-
this.fireContentChanged();
|
|
274
|
-
};
|
|
275
322
|
|
|
276
|
-
|
|
277
|
-
this._table.setVisible(true);
|
|
278
|
-
if (!this._resizeListenerId) {
|
|
279
|
-
this._resizeListenerId = ResizeHandler.register(this, this._handleResize.bind(this));
|
|
280
|
-
}
|
|
323
|
+
this.fireContentChanged();
|
|
281
324
|
};
|
|
282
325
|
|
|
283
326
|
LayersPanel.prototype._setScene = function(scene) {
|
|
284
|
-
this._scene = scene;
|
|
327
|
+
this._scene = scene?.isECADScene() ? scene : null;
|
|
285
328
|
this.refresh();
|
|
286
329
|
};
|
|
287
330
|
|
|
331
|
+
LayersPanel.prototype._extractLayersIndex = function() {
|
|
332
|
+
const index = new Map();
|
|
333
|
+
const metadata = this._scene.getSceneMetadata();
|
|
334
|
+
const layers = metadata.find((el) => el.category === "ecad" && el.tag === "Layers");
|
|
335
|
+
|
|
336
|
+
if (layers) {
|
|
337
|
+
const list = layers.value.split("|");
|
|
338
|
+
list.forEach(function(name) {
|
|
339
|
+
const idx = metadata.find((el) => el.category === name && el.tag === "Index");
|
|
340
|
+
if (idx) {
|
|
341
|
+
index.set(name, idx.value);
|
|
342
|
+
}
|
|
343
|
+
}, this);
|
|
344
|
+
}
|
|
345
|
+
return index;
|
|
346
|
+
};
|
|
347
|
+
|
|
288
348
|
LayersPanel.prototype._getVisibility = function(layer) {
|
|
289
|
-
if (layer.hiddenElements === 0) {
|
|
349
|
+
if (layer.hiddenElements.size === 0) {
|
|
290
350
|
return VisibilityType.Visible;
|
|
291
|
-
} else if (layer.hiddenElements < layer.elements.size) {
|
|
351
|
+
} else if (layer.hiddenElements.size < layer.elements.size) {
|
|
292
352
|
return VisibilityType.Partial;
|
|
293
353
|
}
|
|
294
354
|
return VisibilityType.Hidden;
|
|
295
355
|
};
|
|
296
356
|
|
|
297
|
-
LayersPanel.prototype._extractMetadata = function(
|
|
298
|
-
|
|
299
|
-
|
|
357
|
+
LayersPanel.prototype._extractMetadata = function(nodeRef) {
|
|
358
|
+
const metadata = nodeRef?.userData?.metadata ?? {};
|
|
359
|
+
if (metadata.length) {
|
|
360
|
+
const map = new Map();
|
|
300
361
|
metadata.forEach(function(entry) {
|
|
301
362
|
if (entry.category === "ecad") {
|
|
302
363
|
map.set(entry.tag, entry.value);
|
|
@@ -307,48 +368,33 @@ sap.ui.define([
|
|
|
307
368
|
return null;
|
|
308
369
|
};
|
|
309
370
|
|
|
310
|
-
LayersPanel.prototype.
|
|
311
|
-
|
|
371
|
+
LayersPanel.prototype._addToLayer = function(layers, layerName, nodeRef) {
|
|
372
|
+
let layer = layers.get(layerName);
|
|
312
373
|
if (!layer) {
|
|
313
374
|
layer = {
|
|
314
375
|
name: layerName,
|
|
315
|
-
|
|
376
|
+
index: this._initialLayerIndex++,
|
|
316
377
|
elements: new Map(),
|
|
317
|
-
hiddenElements:
|
|
378
|
+
hiddenElements: new Set()
|
|
318
379
|
};
|
|
319
380
|
layers.set(layerName, layer);
|
|
320
381
|
}
|
|
321
|
-
if (
|
|
322
|
-
layer.hiddenElements
|
|
382
|
+
if (this._manager.getVisibilityState(nodeRef) === false) {
|
|
383
|
+
layer.hiddenElements.add(nodeRef.uid);
|
|
323
384
|
}
|
|
324
385
|
layer.elements.set(nodeRef.uid, nodeRef);
|
|
325
386
|
};
|
|
326
387
|
|
|
327
388
|
LayersPanel.prototype._scanTree = function(layers, nodeRef) {
|
|
328
|
-
|
|
329
|
-
var node = hierarchy.createNodeProxy(nodeRef);
|
|
330
|
-
var metadata = this._extractMetadata(node.getNodeMetadata());
|
|
331
|
-
hierarchy.destroyNodeProxy(node);
|
|
332
|
-
|
|
389
|
+
const metadata = this._extractMetadata(nodeRef);
|
|
333
390
|
if (metadata) {
|
|
334
|
-
|
|
391
|
+
const layer = metadata.get("layer");
|
|
335
392
|
if (layer) {
|
|
336
|
-
this.
|
|
393
|
+
this._addToLayer(layers, layer, nodeRef);
|
|
337
394
|
return; // don't go further down the hierarchy
|
|
338
395
|
}
|
|
339
396
|
}
|
|
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
|
-
//
|
|
397
|
+
nodeRef.children.forEach((child) => this._scanTree(layers, child));
|
|
352
398
|
};
|
|
353
399
|
|
|
354
400
|
LayersPanel.prototype._handleResize = function(event) {
|
|
@@ -358,9 +404,9 @@ sap.ui.define([
|
|
|
358
404
|
LayersPanel.prototype._setContent = function(content) {
|
|
359
405
|
// If there is no explicitly assigned view state manager then use the content connector's default one.
|
|
360
406
|
if (content && !this.getViewStateManager()) {
|
|
361
|
-
|
|
407
|
+
const connector = Element.getElementById(this.getContentConnector());
|
|
362
408
|
if (connector) {
|
|
363
|
-
|
|
409
|
+
const defaultManager = connector.getDefaultViewStateManager();
|
|
364
410
|
if (defaultManager) {
|
|
365
411
|
this.setViewStateManager(defaultManager);
|
|
366
412
|
}
|
|
@@ -375,16 +421,18 @@ sap.ui.define([
|
|
|
375
421
|
};
|
|
376
422
|
|
|
377
423
|
LayersPanel.prototype._onContentChangesFinished = function(event) {
|
|
378
|
-
|
|
424
|
+
// causes second rebuild of everything
|
|
425
|
+
// this.refresh();
|
|
379
426
|
};
|
|
380
427
|
|
|
381
428
|
LayersPanel.prototype._updateButtons = function() {
|
|
382
|
-
|
|
383
|
-
|
|
429
|
+
let canHide = false;
|
|
430
|
+
let canShow = false;
|
|
431
|
+
const selected = this._table.getSelectedItems();
|
|
384
432
|
|
|
385
433
|
selected.forEach(function(item) {
|
|
386
|
-
|
|
387
|
-
|
|
434
|
+
const layer = item.getBindingContext().getObject();
|
|
435
|
+
const visibility = this._getVisibility(layer);
|
|
388
436
|
|
|
389
437
|
if (visibility === VisibilityType.Visible) {
|
|
390
438
|
canHide = true;
|
|
@@ -401,40 +449,108 @@ sap.ui.define([
|
|
|
401
449
|
};
|
|
402
450
|
|
|
403
451
|
LayersPanel.prototype._onShowLayers = function() {
|
|
404
|
-
|
|
405
|
-
|
|
452
|
+
const toShow = [];
|
|
453
|
+
const selected = this._table.getSelectedItems();
|
|
406
454
|
|
|
407
455
|
selected.forEach(function(item) {
|
|
408
|
-
|
|
409
|
-
if (layer.hiddenElements
|
|
410
|
-
layer.hiddenElements
|
|
456
|
+
const layer = item.getBindingContext().getObject();
|
|
457
|
+
if (layer.hiddenElements.size > 0) {
|
|
458
|
+
layer.hiddenElements.clear();
|
|
411
459
|
layer.elements.forEach(function(nodeRef) {
|
|
412
460
|
toShow.push(nodeRef);
|
|
413
|
-
});
|
|
461
|
+
}, this);
|
|
414
462
|
}
|
|
415
|
-
});
|
|
463
|
+
}, this);
|
|
464
|
+
|
|
465
|
+
this._skipEvent = true;
|
|
416
466
|
this._manager.setVisibilityState(toShow, true, true, true);
|
|
417
467
|
this._model.updateBindings(true);
|
|
418
468
|
this._updateButtons();
|
|
419
469
|
};
|
|
420
470
|
|
|
421
471
|
LayersPanel.prototype._onHideLayers = function() {
|
|
422
|
-
|
|
423
|
-
|
|
472
|
+
const toHide = [];
|
|
473
|
+
const selected = this._table.getSelectedItems();
|
|
424
474
|
|
|
425
475
|
selected.forEach(function(item) {
|
|
426
|
-
|
|
427
|
-
if (layer.hiddenElements !== layer.elements.size) {
|
|
428
|
-
layer.hiddenElements
|
|
476
|
+
const layer = item.getBindingContext().getObject();
|
|
477
|
+
if (layer.hiddenElements.size !== layer.elements.size) {
|
|
478
|
+
layer.hiddenElements.clear();
|
|
429
479
|
layer.elements.forEach(function(nodeRef) {
|
|
480
|
+
layer.hiddenElements.add(nodeRef.uid);
|
|
430
481
|
toHide.push(nodeRef);
|
|
431
|
-
});
|
|
482
|
+
}, this);
|
|
432
483
|
}
|
|
433
|
-
});
|
|
484
|
+
}, this);
|
|
485
|
+
this._skipEvent = true;
|
|
434
486
|
this._manager.setVisibilityState(toHide, false, true, true);
|
|
435
487
|
this._model.updateBindings(true);
|
|
436
488
|
this._updateButtons();
|
|
437
489
|
};
|
|
438
490
|
|
|
491
|
+
LayersPanel.prototype._onSearch = function(query) {
|
|
492
|
+
if (query !== "") {
|
|
493
|
+
const selected = [];
|
|
494
|
+
this._table.getItems().forEach(function(item) {
|
|
495
|
+
if (item.getBindingContext().getObject().name.lastIndexOf(query) !== -1) {
|
|
496
|
+
selected.push(item);
|
|
497
|
+
}
|
|
498
|
+
}, this);
|
|
499
|
+
if (selected.length > 0) {
|
|
500
|
+
this._table.removeSelections(true, false);
|
|
501
|
+
selected.forEach(function(item) {
|
|
502
|
+
this._table.setSelectedItem(item);
|
|
503
|
+
}, this);
|
|
504
|
+
this._table.fireSelectionChange({ listItems: selected });
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
LayersPanel.prototype._onSelectionChanged = function(event) {
|
|
510
|
+
this._updateButtons();
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
LayersPanel.prototype._onVisibilityChanged = function(event) {
|
|
514
|
+
if (this._skipEvent) {
|
|
515
|
+
this._skipEvent = false;
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
const layers = this._model.getData();
|
|
519
|
+
const hidden = event.getParameter("hidden");
|
|
520
|
+
const visible = event.getParameter("visible");
|
|
521
|
+
|
|
522
|
+
const process = (list, show) => {
|
|
523
|
+
list.forEach(function(item) {
|
|
524
|
+
const metadata = this._extractMetadata(item);
|
|
525
|
+
const layer = metadata?.get("layer");
|
|
526
|
+
if (layer) {
|
|
527
|
+
const type = metadata?.get("type");
|
|
528
|
+
const input = type === ElementType.Component ? [item] : [item].concat(item.children);
|
|
529
|
+
input.forEach(function(ref) {
|
|
530
|
+
for (let i = 0; i < layers.length; ++i) {
|
|
531
|
+
if (layers[i].elements.has(ref.uid)) {
|
|
532
|
+
if (show) {
|
|
533
|
+
layers[i].hiddenElements.delete(ref.uid);
|
|
534
|
+
} else {
|
|
535
|
+
layers[i].hiddenElements.add(ref.uid);
|
|
536
|
+
}
|
|
537
|
+
break;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
}, this);
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
process(hidden, false);
|
|
546
|
+
process(visible, true);
|
|
547
|
+
|
|
548
|
+
this._model.updateBindings(true);
|
|
549
|
+
this._updateButtons();
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
LayersPanel.prototype._onColumnResize = function(event) {
|
|
553
|
+
};
|
|
554
|
+
|
|
439
555
|
return LayersPanel;
|
|
440
556
|
});
|