@sapui5/sap.ui.vbm 1.103.0 → 1.104.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/vbm/.library +1 -1
- package/src/sap/ui/vbm/Adapter.js +1 -1
- package/src/sap/ui/vbm/Adapter3D.js +45 -11
- package/src/sap/ui/vbm/ClusterBase.js +2 -2
- package/src/sap/ui/vbm/Viewport.js +8 -3
- package/src/sap/ui/vbm/adapter3d/DragDropHandler.js +972 -0
- package/src/sap/ui/vbm/adapter3d/ModelHandler.js +25 -14
- package/src/sap/ui/vbm/adapter3d/ObjectFactory.js +1 -1
- package/src/sap/ui/vbm/adapter3d/PolygonHandler.js +31 -25
- package/src/sap/ui/vbm/adapter3d/SceneBuilder.js +78 -34
- package/src/sap/ui/vbm/adapter3d/Utilities.js +15 -4
- package/src/sap/ui/vbm/adapter3d/VBIJSONParser.js +58 -3
- package/src/sap/ui/vbm/adapter3d/thirdparty/OrbitControls.js +15 -0
- package/src/sap/ui/vbm/lib/sapscene.js +17 -11
- package/src/sap/ui/vbm/lib/sapvobase.js +1 -1
- package/src/sap/ui/vbm/library.js +2 -2
- package/src/sap/ui/vbm/themes/sap_belize_hcb/AnalyticMap.less +4 -0
- package/src/sap/ui/vbm/themes/sap_belize_hcb/VBI.less +96 -0
- package/src/sap/ui/vbm/themes/sap_belize_hcb/library.source.less +4 -1
|
@@ -56,7 +56,7 @@ sap.ui.define([
|
|
|
56
56
|
*
|
|
57
57
|
* @private
|
|
58
58
|
* @author SAP SE
|
|
59
|
-
* @version 1.
|
|
59
|
+
* @version 1.104.0
|
|
60
60
|
* @alias sap.ui.vbm.adapter3d.VBIJSONParser
|
|
61
61
|
*/
|
|
62
62
|
var VBIJSONParser = BaseObject.extend("sap.ui.vbm.adapter3d.VBIJSONParser", /** @lends sap.ui.vbm.adapter3d.VBIJSONParser.prototype */ {
|
|
@@ -84,12 +84,17 @@ sap.ui.define([
|
|
|
84
84
|
* @public
|
|
85
85
|
*/
|
|
86
86
|
VBIJSONParser.prototype.loadVBIJSON = function(payload) {
|
|
87
|
-
// Resources
|
|
88
87
|
if (payload && payload.SAPVB) {
|
|
88
|
+
// Resources
|
|
89
89
|
if (payload.SAPVB.Resources) {
|
|
90
90
|
this._processResources(payload.SAPVB.Resources);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
// Config
|
|
94
|
+
if (payload.SAPVB.Config) {
|
|
95
|
+
this._processConfig(payload.SAPVB.Config);
|
|
96
|
+
}
|
|
97
|
+
|
|
93
98
|
// DataTypes
|
|
94
99
|
if (payload.SAPVB.DataTypes) {
|
|
95
100
|
this._processDataTypes(payload.SAPVB.DataTypes);
|
|
@@ -130,7 +135,7 @@ sap.ui.define([
|
|
|
130
135
|
|
|
131
136
|
////////////////////////////////////////////////////////////////////////////
|
|
132
137
|
// region: Helper functions
|
|
133
|
-
|
|
138
|
+
|
|
134
139
|
/**
|
|
135
140
|
* Copies the named properties from the source to the target if the properties exist in the source.
|
|
136
141
|
*
|
|
@@ -177,6 +182,29 @@ sap.ui.define([
|
|
|
177
182
|
// endregion: Resources
|
|
178
183
|
////////////////////////////////////////////////////////////////////////////
|
|
179
184
|
|
|
185
|
+
|
|
186
|
+
////////////////////////////////////////////////////////////////////////////
|
|
187
|
+
// region: Config
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Processes the config section of VBI JSON.
|
|
191
|
+
*
|
|
192
|
+
* @param {object} config The config section of VBI JSON.
|
|
193
|
+
* @returns {sap.ui.vbm.adapter3d.VBIJSONParser} <code>this</code> to allow method chaining.
|
|
194
|
+
* @private
|
|
195
|
+
*/
|
|
196
|
+
VBIJSONParser.prototype._processConfig = function(config) {
|
|
197
|
+
// Delta not supported
|
|
198
|
+
toArray(config.Set.P).forEach(function(cfg) {
|
|
199
|
+
this._context.config.set(cfg.name, cfg.value);
|
|
200
|
+
}, this);
|
|
201
|
+
return this;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
// endregion: config
|
|
205
|
+
////////////////////////////////////////////////////////////////////////////
|
|
206
|
+
|
|
207
|
+
|
|
180
208
|
////////////////////////////////////////////////////////////////////////////
|
|
181
209
|
// region: DataTypes
|
|
182
210
|
|
|
@@ -203,6 +231,7 @@ sap.ui.define([
|
|
|
203
231
|
dataType.attributes.push(copyProperties(this._factory.createDataTypeAttribute(), attributeElement, ["name", "alias", "type"]));
|
|
204
232
|
}, this);
|
|
205
233
|
|
|
234
|
+
// Nested data types processed to one level deep only
|
|
206
235
|
toArray(dataTypeElement.N).forEach(function(childDataTypeElement) {
|
|
207
236
|
dataType.dataTypes.push(create(childDataTypeElement));
|
|
208
237
|
});
|
|
@@ -835,6 +864,9 @@ sap.ui.define([
|
|
|
835
864
|
// the DataTypes section and is used in the Data section but no visual object has a standard attribute
|
|
836
865
|
// corresponding to it.
|
|
837
866
|
|
|
867
|
+
// TODO directly copy changeable attribute for now
|
|
868
|
+
vo["VB:c"] = dataInstance["VB:c"];
|
|
869
|
+
|
|
838
870
|
// update selection
|
|
839
871
|
var wasSelected = vo["VB:s"] && vo["VB:s"] !== "false" ? true : false;
|
|
840
872
|
var isSelected = dataInstance["VB:s"] && dataInstance["VB:s"] !== "false" ? true : false;
|
|
@@ -1145,5 +1177,28 @@ sap.ui.define([
|
|
|
1145
1177
|
return this;
|
|
1146
1178
|
};
|
|
1147
1179
|
|
|
1180
|
+
/**
|
|
1181
|
+
* Utility function returns alias for the specified Attribute within DataType.
|
|
1182
|
+
* Only top level data types are checked, nested data types are ignored.
|
|
1183
|
+
*
|
|
1184
|
+
* @param {string} dataType The DataType name for the given attribute
|
|
1185
|
+
* @param {string} attribute The Attribute name
|
|
1186
|
+
* @returns {string} String alias of an attribute or undefined if not found
|
|
1187
|
+
*/
|
|
1188
|
+
VBIJSONParser.prototype.getAttributeAlias = function(dataType, attribute) {
|
|
1189
|
+
for (var i = 0; i < this._context.dataTypes.length; ++i) {
|
|
1190
|
+
var type = this._context.dataTypes[i];
|
|
1191
|
+
if (type.name === dataType) {
|
|
1192
|
+
for (var j = 0; j < type.attributes.length; ++j) {
|
|
1193
|
+
var attr = type.attributes[j];
|
|
1194
|
+
if (attr.name === attribute) {
|
|
1195
|
+
return attr.alias;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
return undefined;
|
|
1201
|
+
};
|
|
1202
|
+
|
|
1148
1203
|
return VBIJSONParser;
|
|
1149
1204
|
});
|
|
@@ -154,6 +154,21 @@
|
|
|
154
154
|
state = STATE.NONE;
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
+
this.setEnabled = function(enabled) {
|
|
158
|
+
if (scope.enabled !== enabled) {
|
|
159
|
+
if (pointers.length > 0) {
|
|
160
|
+
pointers.forEach(function(event) {
|
|
161
|
+
delete pointerPositions[event.pointerId];
|
|
162
|
+
});
|
|
163
|
+
scope.domElement.releasePointerCapture(pointers[pointers.length-1].pointerId);
|
|
164
|
+
scope.domElement.removeEventListener('pointermove', onPointerMove);
|
|
165
|
+
scope.domElement.removeEventListener('pointerup', onPointerUp);
|
|
166
|
+
}
|
|
167
|
+
state = STATE.NONE;
|
|
168
|
+
pointers.length = 0;
|
|
169
|
+
scope.enabled = enabled;
|
|
170
|
+
}
|
|
171
|
+
};
|
|
157
172
|
|
|
158
173
|
this.update = function (tag) {
|
|
159
174
|
|
|
@@ -677,18 +677,24 @@ VBI.Scene = function(target) {
|
|
|
677
677
|
}
|
|
678
678
|
// standard case - click on single object
|
|
679
679
|
if (event.hitTests.length > 0) {
|
|
680
|
-
event.hitCached = event.hitTests[0];
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
680
|
+
event.hitCached = event.hitTests[0]; // cache first hit test
|
|
681
|
+
delete event.hitTests; // has to be deleted to avoid collecting hits information again
|
|
682
|
+
// if there is a VO then pass event to it
|
|
683
|
+
if (event.hitCached.m_Vo) {
|
|
684
|
+
return event.hitCached.m_Vo["on" + eventType].call(event.hitCached.m_Vo, event);
|
|
685
|
+
} else {
|
|
686
|
+
delete event.hitCached; // remove it to keep things going "old" way
|
|
687
|
+
}
|
|
688
|
+
} else {
|
|
689
|
+
return false; // not handled
|
|
684
690
|
}
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
691
|
+
}
|
|
692
|
+
// "old" approach -> process from last to first which corresponds to the rendering order (from topmost to last)
|
|
693
|
+
for (var i = scene.m_VOS.length - 1; i >= 0; --i) {
|
|
694
|
+
if ((func = scene.m_VOS[i]["on" + eventType]) && typeof (func) == 'function') {
|
|
695
|
+
// call the handler with the context set to corresponded visual object
|
|
696
|
+
if (func.call(scene.m_VOS[i], event)) {
|
|
697
|
+
return true; // handled
|
|
692
698
|
}
|
|
693
699
|
}
|
|
694
700
|
}
|
|
@@ -1222,7 +1222,7 @@ VBI.VisualObjects = function() {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
// check for design handle context menu subscription.............//
|
|
1224
1224
|
var action, actions = scene.m_Ctx.m_Actions;
|
|
1225
|
-
if (actions && ocb.m_Design && ocb.m_Handle > -1) {
|
|
1225
|
+
if (actions && ocb.m_Design && (ocb.m_Handle > -1 || ocb.m_Hit === VBI.HTBOX)) {
|
|
1226
1226
|
// the action is raised whenever a design action has stopped..//
|
|
1227
1227
|
// for the instanced type.....................................//
|
|
1228
1228
|
// is it a HandleMoved or a HandleClick action ...............//
|
|
@@ -19,7 +19,7 @@ sap.ui.define([
|
|
|
19
19
|
* @namespace
|
|
20
20
|
* @alias sap.ui.vbm
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.104.0
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
25
|
|
|
@@ -42,7 +42,7 @@ sap.ui.define([
|
|
|
42
42
|
"sap.ui.vbm.ClusterBase", "sap.ui.vbm.ClusterTree", "sap.ui.vbm.ClusterGrid", "sap.ui.vbm.ClusterDistance", "sap.ui.vbm.Heatmap",
|
|
43
43
|
"sap.ui.vbm.HeatPoint", "sap.ui.vbm.ClusterContainer", "sap.ui.vbm.Adapter", "sap.ui.vbm.Adapter3D"
|
|
44
44
|
],
|
|
45
|
-
version: "1.
|
|
45
|
+
version: "1.104.0"
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
sap.ui.loader.config({
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
|
|
2
|
+
.vbi-detail {
|
|
3
|
+
background-color: @sapUiBaseBG;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.vbi-detail-closebutton
|
|
7
|
+
{
|
|
8
|
+
background-color: @sapUiBaseBG;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.vbi-detail-content
|
|
12
|
+
{
|
|
13
|
+
background-color: @sapUiBaseBG;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.vbi-detail-phone
|
|
17
|
+
{
|
|
18
|
+
background-color: @sapUiBaseBG;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.vbi-detail > .vbi-detail-arrow.vbi-detail-left
|
|
22
|
+
{
|
|
23
|
+
border-right-color: @sapUiBaseBG;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.vbi-detail > .vbi-detail-header
|
|
27
|
+
{
|
|
28
|
+
font-size: @sapUiFontHeader4Size;
|
|
29
|
+
font-family: @sapUiFontHeaderFamily;
|
|
30
|
+
font-weight: @sapUiFontHeaderWeight;
|
|
31
|
+
color: @sapTextColor;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.vbi-detail-header-phone
|
|
35
|
+
{
|
|
36
|
+
font-family: @sapUiFontHeaderFamily;
|
|
37
|
+
font-weight: @sapUiFontHeaderWeight;
|
|
38
|
+
color: @sapTextColor;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.vbi-legend {
|
|
42
|
+
box-shadow: lighten(@sapUiContentForegroundColor, 20%) 0rem 0rem 0.9rem 0.0625rem;
|
|
43
|
+
font-family: @sapUiFontFamily;
|
|
44
|
+
background-color: @sapUiBaseBG;
|
|
45
|
+
color: @sapTextColor;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.vbi-legend > .vbi-legend-header
|
|
49
|
+
{
|
|
50
|
+
font-size: @sapMFontMediumSize;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.vbi-legend-button-col:hover
|
|
54
|
+
{
|
|
55
|
+
background-color: @sapUiHighlight;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.vbi-legend-button-col:active
|
|
59
|
+
{
|
|
60
|
+
background-color: darken(@sapUiHighlight, 20%);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.vbi-legend-button-exp:hover
|
|
64
|
+
{
|
|
65
|
+
background-color: @sapUiHighlight;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.vbi-legend-button-exp:active
|
|
69
|
+
{
|
|
70
|
+
background-color: darken(@sapUiHighlight, 20%);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.vbi-legend-table
|
|
74
|
+
{
|
|
75
|
+
font-size: @sapMFontSmallSize;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.vbi-legend-table-click
|
|
79
|
+
{
|
|
80
|
+
tr:hover {
|
|
81
|
+
background-color: @sapUiHighlight;
|
|
82
|
+
};
|
|
83
|
+
tr:active {
|
|
84
|
+
background-color: darken(@sapUiHighlight, 20%);
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.vbi-legend-content-celltext
|
|
89
|
+
{
|
|
90
|
+
color: @sapUiChartLegendLabelFontColor;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.vbi-legend-content-celldiv-square
|
|
94
|
+
{
|
|
95
|
+
border-color: @sapUiContentForegroundColor;
|
|
96
|
+
}
|
|
@@ -4,4 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
@import "../base/library.source.less";
|
|
6
6
|
@import "../../../../../sap/ui/core/themes/sap_belize_hcb/base.less";
|
|
7
|
-
@import "../../../../../sap/ui/core/themes/sap_belize_hcb/global.less";
|
|
7
|
+
@import "../../../../../sap/ui/core/themes/sap_belize_hcb/global.less";
|
|
8
|
+
|
|
9
|
+
@import "AnalyticMap.less";
|
|
10
|
+
@import "VBI.less";
|