@sapui5/sap.ui.vbm 1.97.0 → 1.100.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ui.vbm",
3
- "version": "1.97.0",
3
+ "version": "1.100.0",
4
4
  "description": "SAPUI5 Library sap.ui.vbm",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -3,7 +3,7 @@
3
3
  <name>sap.ui.vbm</name>
4
4
  <vendor>SAP SE</vendor>
5
5
  <copyright>SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved</copyright>
6
- <version>1.97.0</version>
6
+ <version>1.100.0</version>
7
7
 
8
8
  <documentation>SAP UI library: sap.ui.vbm</documentation>
9
9
 
@@ -36,6 +36,13 @@
36
36
  <exclude name="sap.ui.vbm.js." />
37
37
  <exclude name="sap.ui.vbm.lib." />
38
38
  </jscoverage>
39
+
40
+ <packaging xmlns="http://www.sap.com/ui5/buildext/packaging" version="2.0" >
41
+ <all-in-one>
42
+ <exclude name="sap/ui/vbm/adapter3d/thirdparty/" />
43
+ </all-in-one>
44
+ </packaging>
45
+
39
46
  <documentation xmlns="http://www.sap.com/ui5/buildext/documentation"
40
47
  indexUrl="../../../../test-resources/sap/ui/vbm/demokit/docuindex.json"
41
48
  resolve="lib"
@@ -22,13 +22,12 @@ sap.ui.define([
22
22
  * @param {string} [sId] id for the new control, generated automatically if no id is given
23
23
  * @param {object} [mSettings] initial settings for the new object
24
24
  * @author SAP SE
25
- * @version 1.97.0
25
+ * @version 1.100.0
26
26
  * @extends sap.ui.core.Element
27
27
  * @constructor
28
28
  * @public
29
29
  * @alias sap.ui.vbm.Adapter
30
30
  * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel
31
- * @experimental Since 1.48.0 This class is experimental and might be modified or removed in future versions.
32
31
  */
33
32
  var Adapter = Element.extend("sap.ui.vbm.Adapter", /** @lends sap.ui.vbm.Adapter.prototype */ {
34
33
  metadata: {
@@ -102,6 +101,32 @@ sap.ui.define([
102
101
  "start",
103
102
  "tooltip"];
104
103
 
104
+ this._areaProperties = [
105
+ "key", //K: VoBase
106
+ "color", //C: Area, OBJECT_BASE_DATA->FILL_COLOR
107
+ "colorBorder", //D/CB: Area, OBJECT_BASE_DATA->BORDER_COLOR
108
+ "posarray", //H, PM (multipart) /P: Area, AREA_EXTENSION->BORDER_POINTS
109
+ "selectColor", //SC: OBJECT_BASE_DATA->SELECT_COLOR
110
+ "dragdata", //DD: VoAggregation, OBJECT_BASE_DATA->DRAG_DATA
111
+ "VB:s", //VB:s: elected, OBJECT_BASE_DATA->SELECTED
112
+ "VB:c", //H/VB:c: VoAggregation (changeable) OBJECT_BASE_DATA->CHANGEABLE
113
+ "hotScale", //HS: VoAggregation
114
+ "hotDeltaColor", //HC/HDC: VoAggregation, OBJECT_BASE_DATA->HOT_COLOR
115
+ "borderDash", //BD: Area
116
+ "selectColor", //SC: VoAggregation
117
+ "fxdir", //FD: VoAggregation
118
+ "fxsize", //FS: VoAggregation
119
+ "entity", //ET: VoAggregation
120
+ "labelBgColor", //LC/LBC: VoAggregation
121
+ "labelBorderColor", //LBBC: VoAggregation
122
+ "labelPos", //LP: VoAggregation
123
+ "labelText", //LT: VoAggregation
124
+ "labelArrow", //??VOBase
125
+ "label", //L
126
+ "labelAlignment", //"LA"
127
+ "tooltip" //B/TT: VoAggregation
128
+ ];
129
+
105
130
  // Allowed Spot properties
106
131
  this._spotProperties = [
107
132
  "alignment",
@@ -474,6 +499,7 @@ sap.ui.define([
474
499
  * "Set": [
475
500
  * { "name": "Spots", "type": "N", ....},
476
501
  * { "name": "Links", "type": "N", ....},
502
+ * { "name": "Areas", "type": "N", ....},
477
503
  * ]
478
504
  * }
479
505
  *
@@ -483,6 +509,7 @@ sap.ui.define([
483
509
  * "N": [
484
510
  * { "name": "Spots", ... },
485
511
  * { "name": "Links", ... },
512
+ * { "name": "Areas", ... },
486
513
  * ]
487
514
  * }
488
515
  * }
@@ -787,13 +814,18 @@ sap.ui.define([
787
814
  processDragAndDrop();
788
815
  break;
789
816
  case "{00100000-2012-0004-B001-F311DE491C77}": // Area
817
+ processProperties(this._areaProperties, this._propsAnomalies);
818
+ voTemplate = new sap.ui.vbm.Area(settings);
819
+ voAggregation = new sap.ui.vbm.Areas(this._ui5Id(definition.id));
820
+ processDragAndDrop();
821
+ break;
822
+ case "{00100000-2014-0004-BDA8-87B904609063}": // "ExtArea" GUID??? from sapvobase
823
+ case "{00100000-2014-0004-B001-9F1B43BE944A}": // "ExtLink" GUID??? from sapvobase
790
824
  case "{00100000-2013-0004-B001-7EB3CCC039C4}": // Circle
791
825
  case "{00100000-2013-0004-B001-686F01B57873}": // Geo Circle
792
826
  case "{00100000-2012-0004-B001-BFED458C3076}": // Box
793
827
  case "{00100000-2012-0004-B001-383477EA1DEB}": // Pie Chart
794
828
  case "{388951f5-a66b-4423-a5ad-e0ee13c2246f}": // Decal
795
- case "ExtLink": // GUID???
796
- case "ExtArea": // GUID???
797
829
  default:
798
830
  Log.debug("unsupported VO type", definition.type, thisModule);
799
831
  return;
@@ -917,6 +949,9 @@ sap.ui.define([
917
949
  case "Drop":
918
950
  this._event = "drop";
919
951
  break;
952
+ case "CreateComplete":
953
+ this._event = "createComplete";
954
+ break;
920
955
  case "Select":
921
956
  this._event = "select";
922
957
  break;
@@ -930,7 +965,14 @@ sap.ui.define([
930
965
  this._handler = this._adapter._getKeyboardHandler(this.name);
931
966
  break;
932
967
  default:
933
- return false;
968
+ if (this.refEvent && this.name) {
969
+ //register for event on map that we don't explicitly handle using its legacy name as its refevent name is unlikely to propagate
970
+ Log.info("No UI5 event found to attach action to. Falling through to default vbi event handling.", this.name, thisModule);
971
+ this._event = this.name;
972
+ } else {
973
+ Log.error("Action invalid. No refEvent or name supplied.", this, thisModule);
974
+ return false;
975
+ }
934
976
  }
935
977
  this._target.attachEvent(this._event, this._handler, this._listener);
936
978
  this._target.invalidate(); // neccessary evil, to force recreation of VO on VBI level, otherwise VO on GeoMap level updated but not on VBI level
@@ -1468,17 +1510,28 @@ sap.ui.define([
1468
1510
  var oParameters = event.getParameters();
1469
1511
  var oEventData = oParameters.data ? oParameters.data : oParameters;
1470
1512
 
1513
+ //If no event object then fire submit with original data
1514
+ if (oEventData.Action && !oEventData.Action.object) {
1515
+ this.fireSubmit({
1516
+ data: JSON.stringify(oEventData)
1517
+ });
1518
+ return;
1519
+ }
1520
+
1471
1521
  if (oEventData.Action.object.startsWith(this._map().getId())) {
1472
1522
  oEventData.Action.object = oEventData.Action.object.substr(this._map().getId().length + 1)
1473
1523
  }
1474
1524
  if (oEventData.Action && oEventData.Action.object) {
1475
1525
  // Whatever back-end refers to as Links, they are referred to as Routes by Geomap
1476
- if (oEventData.Action.object === "Route") {
1477
- oEventData.Action.object = "Link";
1526
+ var routeName = "Route", linkName = "Link";
1527
+ var actionObjects = [oEventData.Action.object];
1528
+ if (oEventData.Action.object === routeName) {
1529
+ actionObjects.push(linkName);
1530
+ oEventData.Action.object = linkName;
1478
1531
  }
1479
1532
 
1480
1533
  var oAction = sap.ui.vbm.findInArray(this._actions, function(action) {
1481
- return oEventData.Action.object === action.refVO && oEventData.Action.name.toLowerCase() === action.refEvent.toLowerCase();
1534
+ return (actionObjects.indexOf(action.refVO) != -1) && oEventData.Action.name.toLowerCase() === action.refEvent.toLowerCase();
1482
1535
  });
1483
1536
 
1484
1537
  if (oAction) {
@@ -1586,7 +1639,7 @@ sap.ui.define([
1586
1639
  }
1587
1640
  }, this);
1588
1641
 
1589
- this.fireSubmit({
1642
+ this.fireSubmit({
1590
1643
  data: JSON.stringify(oEventData)
1591
1644
  });
1592
1645
  }
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  "./adapter3d/thirdparty/three",
24
24
  "sap/base/Log",
25
25
  "jquery.sap.global",
26
- "./library"
26
+ "./library"
27
27
  ], function(Element, Observer, Menu, MenuItem, Popover, Viewport, ObjectFactory, Parser, SceneBuilder, Utilities, HBox, VBox, Link, Button, Text, Image, THREE, Log, jQuery, library) {
28
28
  "use strict";
29
29
 
@@ -41,7 +41,7 @@ sap.ui.define([
41
41
  * @param {string} [sId] id for the new control, generated automatically if no id is given
42
42
  * @param {object} [mSettings] initial settings for the new object
43
43
  * @author SAP SE
44
- * @version 1.97.0
44
+ * @version 1.100.0
45
45
  * @extends sap.ui.core.Element
46
46
  * @constructor
47
47
  * @public
@@ -153,7 +153,7 @@ sap.ui.define([
153
153
  this.toAdd.clear();
154
154
  this.toUpdate.clear();
155
155
  this.toRemove.clear();
156
- }
156
+ }
157
157
  },
158
158
 
159
159
  // Each queue contains a list of scenes to add, update or remove.
@@ -216,7 +216,7 @@ sap.ui.define([
216
216
  anchor: undefined, // anchor DOM element to display responsive popover
217
217
  pending: undefined // pending popover, if viewport has not been rendered yet
218
218
  };
219
-
219
+
220
220
  this._raycaster = new THREE.Raycaster();
221
221
  };
222
222
 
@@ -384,7 +384,7 @@ sap.ui.define([
384
384
  that._context.voQueues.clear();
385
385
  that._context.sceneQueues.clear();
386
386
  that._context.windowQueues.clear();
387
-
387
+
388
388
  // scene has changed -> adjust camera clipping planes
389
389
  that._viewport._resetBBox();
390
390
  that._viewport._updateCamera();
@@ -720,6 +720,13 @@ sap.ui.define([
720
720
  };
721
721
 
722
722
  Adapter3D.prototype._genericEventHandler = function(name, event) {
723
+ // special handling section for hardcoded keys
724
+ // 'h' button pressed -> change camera to 'home' (initial) view
725
+ if (event.keyCode == 72) {
726
+ this._viewport.applyCameraHome(false); // no fly-to animation needed here
727
+ return;
728
+ }
729
+
723
730
  var instance = event.instance;
724
731
  var groupId = instance ? instance.voGroup.id : event.voGroupId;
725
732
  var actionDefinition = sap.ui.vbm.findInArray(this._context.actions, function(action) { return action.refVO === groupId && action.refEvent === name; });
@@ -741,40 +748,32 @@ sap.ui.define([
741
748
  };
742
749
 
743
750
  if (actionDefinition.name === "KEY_PRESS") {
744
- // special handling for 'h' button pressed -> change camera to home view
745
- if (event.keyCode == 72) {
746
- this._viewport.applyCameraHome(false); // no fly-to animation needed here
747
- //this._sceneBuilder._polygonHandler._executeTest(); // TODO
751
+ if (["Shift", "Control", "Alt", "Meta"].indexOf(event.key) !== -1 || [16, 17, 18, 91].indexOf(event.code) !== -1) {
752
+ return;
753
+ } else {
754
+ param.push(
755
+ {
756
+ "name": "code",
757
+ "#": event.keyCode
758
+ },
759
+ {
760
+ "name": "shift",
761
+ "#": event.shiftKey
762
+ },
763
+ {
764
+ "name": "ctrl",
765
+ "#": event.ctrlKey
766
+ },
767
+ {
768
+ "name": "alt",
769
+ "#": event.altKey
770
+ },
771
+ {
772
+ "name": "meta",
773
+ "#": event.metaKey
774
+ }
775
+ );
748
776
  }
749
- if (event.key == "Shift" || event.code == 16 ||
750
- event.key == "Control" || event.code == 17 ||
751
- event.key == "Alt" || event.code == 18 ||
752
- event.key == "Meta" || event.code == 91) {
753
- return;
754
- } else {
755
- param.push(
756
- {
757
- "name": "code",
758
- "#": event.keyCode
759
- },
760
- {
761
- "name": "shift",
762
- "#": event.shiftKey
763
- },
764
- {
765
- "name": "ctrl",
766
- "#": event.ctrlKey
767
- },
768
- {
769
- "name": "alt",
770
- "#": event.altKey
771
- },
772
- {
773
- "name": "meta",
774
- "#": event.metaKey
775
- }
776
- );
777
- }
778
777
  } else if (event && event.cursor) {
779
778
  param.push(
780
779
  {
@@ -821,22 +820,25 @@ sap.ui.define([
821
820
  }
822
821
 
823
822
  if (instance && name === "Click" && event.selectionChanges) {
823
+ var dataType = instance.voGroup.datasource, obj;
824
+ var keyAlias = Utilities.getAttributeAlias(this._context, dataType, instance.voGroup.keyAttributeName);
825
+
824
826
  payload.Data = {
825
827
  Merge: {
826
828
  N: [
827
829
  {
828
830
  name: instance.voGroup.datasource,
829
831
  E: event.selectionChanges.selected.map(function(instance) {
830
- return {
831
- K: instance ? instance.id : "",
832
- "VB:s": "true"
833
- };
834
- }).concat(event.selectionChanges.deselected.map(function(instance) {
835
- return {
836
- K: instance ? instance.id : "",
837
- "VB:s": "false"
838
- };
839
- }))
832
+ obj = {};
833
+ obj[keyAlias] = instance.id || "";
834
+ obj["VB:s"] = "true";
835
+ return obj;
836
+ }).concat(event.selectionChanges.deselected.map(function(instance) {
837
+ obj = {};
838
+ obj[keyAlias] = instance.id || "";
839
+ obj["VB:s"] = "false";
840
+ return obj;
841
+ }))
840
842
  }
841
843
  ]
842
844
  }
@@ -917,7 +919,7 @@ sap.ui.define([
917
919
 
918
920
  if (instance !== this._hoverInstance) {
919
921
  clearTimeout(this._hoverTimeOutId);
920
-
922
+
921
923
  this._hoverTimeOutId = setTimeout(function() {
922
924
  this._propogateHoverChange(event);
923
925
  this._hoverTimeOutId = undefined;
@@ -948,7 +950,7 @@ sap.ui.define([
948
950
 
949
951
  var rect = this._viewport.getDomRef().getBoundingClientRect();
950
952
  var normalizedXY = new THREE.Vector2(p.x / rect.width * 2 - 1, -p.y / rect.height * 2 + 1);
951
-
953
+
952
954
  this._raycaster.layers.set(0); // test objects from layer #0 only
953
955
  this._raycaster.setFromCamera(normalizedXY, camera);
954
956
  var intersects = this._raycaster.intersectObjects(scene.children, true);
@@ -961,7 +963,7 @@ sap.ui.define([
961
963
  } else {
962
964
  instance = info.object._sapInstance;
963
965
  }
964
-
966
+
965
967
  return {
966
968
  info: info,
967
969
  point: info.point,
@@ -1058,7 +1058,8 @@ sap.ui.define([
1058
1058
  case "click":
1059
1059
  // fire the click..................................................//
1060
1060
  this.fireClick({
1061
- pos: datEvent.Action.AddActionProperties.AddActionProperty[0]['#']
1061
+ pos: datEvent.Action.AddActionProperties.AddActionProperty[0]['#'],
1062
+ data: datEvent //include VBI data to the UI5 event payload
1062
1063
  });
1063
1064
  break;
1064
1065
  case "contextMenu":
@@ -1073,7 +1074,8 @@ sap.ui.define([
1073
1074
  case "drop":
1074
1075
  // fire the drop..................................................//
1075
1076
  this.fireDrop({
1076
- pos: datEvent.Action.AddActionProperties.AddActionProperty[0]['#']
1077
+ pos: datEvent.Action.AddActionProperties.AddActionProperty[0]['#'],
1078
+ data: datEvent //include VBI data to the UI5 event payload
1077
1079
  });
1078
1080
  break;
1079
1081
  case "zoomChanged":
@@ -1084,7 +1086,8 @@ sap.ui.define([
1084
1086
  viewportBB: {
1085
1087
  upperLeft: datEvent.Action.Params.Param[3]['#'],
1086
1088
  lowerRight: datEvent.Action.Params.Param[4]['#']
1087
- }
1089
+ },
1090
+ data: datEvent //include VBI data to the UI5 event payload
1088
1091
  });
1089
1092
  break;
1090
1093
  case "centerChanged":
@@ -1095,7 +1098,8 @@ sap.ui.define([
1095
1098
  viewportBB: {
1096
1099
  upperLeft: datEvent.Action.Params.Param[3]['#'],
1097
1100
  lowerRight: datEvent.Action.Params.Param[4]['#']
1098
- }
1101
+ },
1102
+ data: datEvent //include VBI data to the UI5 event payload
1099
1103
  });
1100
1104
  break;
1101
1105
  case "select":
@@ -1121,6 +1125,12 @@ sap.ui.define([
1121
1125
  this.mIACreateCB = null;
1122
1126
  throw exc;
1123
1127
  }
1128
+ } else {
1129
+ // If interactive editing was triggered indirectly (e.g. via vbiJSON load) then fire event
1130
+ datEvent.Action.name = "CreateComplete";
1131
+ //include VBI data to the UI5 event payload
1132
+ this.fireEvent("createComplete", {data: datEvent}, true);
1133
+ e.preventDefault();
1124
1134
  }
1125
1135
  break;
1126
1136
  case "keydown":
@@ -2226,4 +2236,4 @@ sap.ui.define([
2226
2236
 
2227
2237
  return GeoMap;
2228
2238
 
2229
- }, /* bExport= */true);
2239
+ }, /* bExport= */true);
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  *
24
24
  * @public
25
25
  * @author SAP SE
26
- * @version 1.97.0
26
+ * @version 1.100.0
27
27
  * @extends sap.ui.core.Control
28
28
  * @alias sap.ui.vbm.Viewport
29
29
  */
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  *
30
30
  * @private
31
31
  * @author SAP SE
32
- * @version 1.97.0
32
+ * @version 1.100.0
33
33
  * @alias sap.ui.vbm.adapter3d.ModelHandler
34
34
  */
35
35
  var ModelHandler = BaseObject.extend("sap.ui.vbm.adapter3d.ModelHandler", /** @lends sap.ui.vbm.adapter3d.ModelHandler.prototype */ {
@@ -377,7 +377,7 @@ sap.ui.define([
377
377
  *
378
378
  * @private
379
379
  * @author SAP SE
380
- * @version 1.97.0
380
+ * @version 1.100.0
381
381
  * @alias sap.ui.vbm.adapter3d.ObjectFactory
382
382
  */
383
383
  var ObjectFactory = BaseObject.extend("sap.ui.vbm.adapter3d.ObjectFactory", /** @lends sap.ui.vbm.adapter3d.ObjectFactory.prototype */ {});
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  *
33
33
  * @private
34
34
  * @author SAP SE
35
- * @version 1.97.0
35
+ * @version 1.100.0
36
36
  * @alias sap.ui.vbm.adapter3d.PolygonHandler
37
37
  */
38
38
  var PolygonHandler = BaseObject.extend("sap.ui.vbm.adapter3d.PolygonHandler", /** @lends sap.ui.vbm.adapter3d.PolygonHandler.prototype */ {
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  *
47
47
  * @private
48
48
  * @author SAP SE
49
- * @version 1.97.0
49
+ * @version 1.100.0
50
50
  * @alias sap.ui.vbm.adapter3d.SceneBuilder
51
51
  */
52
52
  var SceneBuilder = BaseObject.extend("sap.ui.vbm.adapter3d.SceneBuilder", /** @lends sap.ui.vbm.adapter3d.SceneBuilder.prototype */ {
@@ -351,6 +351,8 @@ sap.ui.define([
351
351
 
352
352
  var iframe = document.createElement("iframe");
353
353
  iframe.style.visibility = "hidden";
354
+ // use sandbox attribute to disable script execution and all other suspicious activities in iframe as we cannot affectively escape input HTML.
355
+ iframe.sandbox = "allow-same-origin";
354
356
  iframe.width = width;
355
357
  iframe.height = height;
356
358
  document.body.appendChild(iframe);
@@ -213,11 +213,11 @@ sap.ui.define([
213
213
  var color = Utilities.toColor(source);
214
214
  var selected = Utilities.toBoolean(instance["VB:s"]);
215
215
 
216
- if (selected) {
216
+ if (selected) {
217
217
  // if direct color -> override current, if delta color -> apply on top
218
218
  var selectDelta = Utilities.isColorDelta(instance.selectColor);
219
219
  var selectColor = selectDelta ? Utilities.toColorDelta(instance.selectColor) : Utilities.toColor(instance.selectColor);
220
-
220
+
221
221
  if (selectDelta) {
222
222
  Utilities.applyDeltaHLS(color.rgb, selectColor.hls);
223
223
  color.opacity = Utilities.clamp(color.opacity * selectColor.opacity, 0.0, 1.0);
@@ -230,7 +230,7 @@ sap.ui.define([
230
230
  // if direct color -> override current, if delta color -> apply on top
231
231
  var hotDelta = Utilities.isColorDelta(instance.hotDeltaColor);
232
232
  var hotColor = hotDelta ? Utilities.toColorDelta(instance.hotDeltaColor) : Utilities.toColor(instance.hotDeltaColor);
233
-
233
+
234
234
  if (hotDelta) {
235
235
  Utilities.applyDeltaHLS(color.rgb, hotColor.hls);
236
236
  color.opacity = Utilities.clamp(color.opacity * hotColor.opacity, 0.0, 1.0);
@@ -305,7 +305,7 @@ sap.ui.define([
305
305
  }
306
306
  material.transparent = material.opacity < 1;
307
307
  });
308
- });
308
+ });
309
309
  });
310
310
  };
311
311
 
@@ -350,7 +350,7 @@ sap.ui.define([
350
350
  Utilities.getInstanceTransform = function(instance, position, rotation, scale, bbox) {
351
351
  Utilities.toVector3(instance.pos, position);
352
352
  Utilities.toVector3(instance.scale, scale);
353
-
353
+
354
354
  var rot = Utilities.toVector3(instance.rot);
355
355
  rotation.set(degToRad(rot.x), degToRad(rot.y), degToRad(rot.z), "YXZ");
356
356
 
@@ -427,7 +427,7 @@ sap.ui.define([
427
427
  Utilities.propertyAdded = function(instance, property) {
428
428
  return instance[property] && !instance._last[property];
429
429
  };
430
-
430
+
431
431
  Utilities.propertyRemoved = function(instance, property) {
432
432
  return !instance[property] && instance._last[property];
433
433
  };
@@ -458,7 +458,7 @@ sap.ui.define([
458
458
  /**
459
459
  * Normalize the object. Implementation replicates Visual Business ActiveX implementation of object(s) normalization.
460
460
  * The node is centered and then scaled uniformly so that vertex coordinates fit into the 3D box defined as range [(-1, -1, -1), (+1, +1, +1)].
461
- *
461
+ *
462
462
  * @param {THREE.Object3D} root The node to normalize.
463
463
  * @param {THREE.Matrix4} [matrix] Copy transformation into matrix or apply to root directly.
464
464
  * @param {THREE.Box3} [bbox] Copy bounding box into it.
@@ -491,13 +491,13 @@ sap.ui.define([
491
491
 
492
492
  if (bbox) {
493
493
  bbox.copy(box);
494
- }
495
-
494
+ }
495
+
496
496
  var m1 = new Matrix4().makeScale(scaleFactor, scaleFactor, scaleFactor);
497
497
  var m2 = new Matrix4().makeTranslation(-center.x, -center.y, -center.z);
498
498
 
499
499
  root.updateMatrix(); // make sure local TM is up to date
500
-
500
+
501
501
  m1.multiply(m2);
502
502
  m1.multiply(root.matrix);
503
503
 
@@ -510,7 +510,7 @@ sap.ui.define([
510
510
 
511
511
  /**
512
512
  * Clone material(s). Material can be single object or array of materials.
513
- *
513
+ *
514
514
  * @param {THREE.Material|THREE.Material[]} material Material(s) to clone.
515
515
  * @return {THREE.Material|THREE.Material[]} Cloned material(s).
516
516
  */
@@ -526,5 +526,29 @@ sap.ui.define([
526
526
  return material;
527
527
  };
528
528
 
529
+ /**
530
+ * Function returns alias for the specified Attribute within DataType.
531
+ * Only top level data types are checked, nested data types are ignored.
532
+ *
533
+ * @param {object} context The Context which holds all definitions and populated data
534
+ * @param {string} dataType The DataType name for the given attribute
535
+ * @param {string} attribute The Attribute name
536
+ * @returns {string} String alias of an attribute or undefined if not found
537
+ */
538
+ Utilities.getAttributeAlias = function(context, dataType, attribute) {
539
+ for (var i = 0; i < context.dataTypes.length; ++i) {
540
+ var type = context.dataTypes[i];
541
+ if (type.name === dataType) {
542
+ for (var j = 0; j < type.attributes.length; ++j) {
543
+ var attr = type.attributes[j];
544
+ if (attr.name === attribute) {
545
+ return attr.alias;
546
+ }
547
+ }
548
+ }
549
+ }
550
+ return undefined;
551
+ };
552
+
529
553
  return Utilities;
530
554
  });
@@ -56,7 +56,7 @@ sap.ui.define([
56
56
  *
57
57
  * @private
58
58
  * @author SAP SE
59
- * @version 1.97.0
59
+ * @version 1.100.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 */ {