@sapui5/sap.ui.vbm 1.94.0 → 1.96.2

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.
Files changed (104) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/vbm/.library +1 -1
  3. package/src/sap/ui/vbm/Adapter.js +18 -14
  4. package/src/sap/ui/vbm/Adapter3D.js +2 -2
  5. package/src/sap/ui/vbm/AnalyticMap.js +1 -1
  6. package/src/sap/ui/vbm/AnalyticMapRenderer.js +1 -1
  7. package/src/sap/ui/vbm/Area.js +1 -1
  8. package/src/sap/ui/vbm/Areas.js +8 -9
  9. package/src/sap/ui/vbm/Box.js +1 -1
  10. package/src/sap/ui/vbm/Boxes.js +1 -1
  11. package/src/sap/ui/vbm/Circle.js +1 -1
  12. package/src/sap/ui/vbm/Circles.js +1 -1
  13. package/src/sap/ui/vbm/Cluster.js +5 -4
  14. package/src/sap/ui/vbm/ClusterBase.js +5 -8
  15. package/src/sap/ui/vbm/ClusterContainer.js +1 -1
  16. package/src/sap/ui/vbm/ClusterDistance.js +1 -1
  17. package/src/sap/ui/vbm/ClusterGrid.js +1 -1
  18. package/src/sap/ui/vbm/ClusterRenderer.js +1 -2
  19. package/src/sap/ui/vbm/ClusterTree.js +1 -1
  20. package/src/sap/ui/vbm/Container.js +1 -1
  21. package/src/sap/ui/vbm/Containers.js +4 -6
  22. package/src/sap/ui/vbm/DragSource.js +1 -1
  23. package/src/sap/ui/vbm/DropTarget.js +1 -1
  24. package/src/sap/ui/vbm/Feature.js +1 -1
  25. package/src/sap/ui/vbm/FeatureCollection.js +1 -1
  26. package/src/sap/ui/vbm/GeoCircle.js +1 -1
  27. package/src/sap/ui/vbm/GeoCircles.js +1 -1
  28. package/src/sap/ui/vbm/GeoJsonLayer.js +10 -11
  29. package/src/sap/ui/vbm/GeoMap.js +4 -3
  30. package/src/sap/ui/vbm/GeoMapRenderer.js +1 -1
  31. package/src/sap/ui/vbm/HeatPoint.js +1 -1
  32. package/src/sap/ui/vbm/Heatmap.js +1 -1
  33. package/src/sap/ui/vbm/Legend.js +1 -1
  34. package/src/sap/ui/vbm/LegendItem.js +1 -1
  35. package/src/sap/ui/vbm/Pie.js +1 -1
  36. package/src/sap/ui/vbm/PieItem.js +1 -1
  37. package/src/sap/ui/vbm/Pies.js +1 -1
  38. package/src/sap/ui/vbm/Region.js +1 -1
  39. package/src/sap/ui/vbm/Resource.js +1 -1
  40. package/src/sap/ui/vbm/Route.js +1 -1
  41. package/src/sap/ui/vbm/Routes.js +1 -1
  42. package/src/sap/ui/vbm/Spot.js +1 -1
  43. package/src/sap/ui/vbm/Spots.js +1 -1
  44. package/src/sap/ui/vbm/VBI.js +41 -9
  45. package/src/sap/ui/vbm/VBIRenderer.js +1 -1
  46. package/src/sap/ui/vbm/Viewport.js +7 -6
  47. package/src/sap/ui/vbm/ViewportRenderer.js +1 -1
  48. package/src/sap/ui/vbm/VoAbstract.js +1 -1
  49. package/src/sap/ui/vbm/VoAggregation.js +4 -6
  50. package/src/sap/ui/vbm/VoBase.js +1 -1
  51. package/src/sap/ui/vbm/adapter3d/ModelHandler.js +2 -2
  52. package/src/sap/ui/vbm/adapter3d/ObjectFactory.js +2 -2
  53. package/src/sap/ui/vbm/adapter3d/PolygonHandler.js +2 -2
  54. package/src/sap/ui/vbm/adapter3d/SceneBuilder.js +271 -183
  55. package/src/sap/ui/vbm/adapter3d/Utilities.js +1 -1
  56. package/src/sap/ui/vbm/adapter3d/VBIJSONParser.js +2 -2
  57. package/src/sap/ui/vbm/adapter3d/thirdparty/ColladaLoader.js +2267 -2509
  58. package/src/sap/ui/vbm/adapter3d/thirdparty/DecalGeometry.js +194 -266
  59. package/src/sap/ui/vbm/adapter3d/thirdparty/OrbitControls.js +1004 -700
  60. package/src/sap/ui/vbm/lib/sapactions.js +12 -9
  61. package/src/sap/ui/vbm/lib/sapautomations.js +12 -13
  62. package/src/sap/ui/vbm/lib/sapconfig.js +11 -3
  63. package/src/sap/ui/vbm/lib/sapdataprovider.js +11 -21
  64. package/src/sap/ui/vbm/lib/sapevents.js +11 -11
  65. package/src/sap/ui/vbm/lib/sapgeolocation.js +10 -3
  66. package/src/sap/ui/vbm/lib/sapgeomath.js +11 -4
  67. package/src/sap/ui/vbm/lib/sapgeotool.js +12 -3
  68. package/src/sap/ui/vbm/lib/sapheatmap.js +28 -25
  69. package/src/sap/ui/vbm/lib/saplabels.js +17 -11
  70. package/src/sap/ui/vbm/lib/saplassotrack.js +11 -5
  71. package/src/sap/ui/vbm/lib/sapmaplayer.js +13 -10
  72. package/src/sap/ui/vbm/lib/sapmapmanager.js +14 -4
  73. package/src/sap/ui/vbm/lib/sapmapprovider.js +11 -5
  74. package/src/sap/ui/vbm/lib/sapnavigation.js +11 -3
  75. package/src/sap/ui/vbm/lib/sapparsing.js +11 -1
  76. package/src/sap/ui/vbm/lib/sappositioning.js +12 -5
  77. package/src/sap/ui/vbm/lib/sapprojection.js +12 -5
  78. package/src/sap/ui/vbm/lib/saprecttrack.js +11 -5
  79. package/src/sap/ui/vbm/lib/sapresources.js +12 -6
  80. package/src/sap/ui/vbm/lib/sapscale.js +15 -5
  81. package/src/sap/ui/vbm/lib/sapscene.js +15 -13
  82. package/src/sap/ui/vbm/lib/saputilities.js +19 -91
  83. package/src/sap/ui/vbm/lib/sapvbcluster.js +14 -6
  84. package/src/sap/ui/vbm/lib/sapvbi.js +11 -42
  85. package/src/sap/ui/vbm/lib/sapvbicontext.js +11 -5
  86. package/src/sap/ui/vbm/lib/sapvbmenu.js +19 -13
  87. package/src/sap/ui/vbm/lib/sapvobase.js +17 -16
  88. package/src/sap/ui/vbm/lib/sapvoutils.js +14 -24
  89. package/src/sap/ui/vbm/lib/sapwindow.js +12 -12
  90. package/src/sap/ui/vbm/library.js +29 -32
  91. package/src/sap/ui/vbm/themes/base/library.source.less +1 -1
  92. package/src/sap/ui/vbm/themes/sap_belize/library.source.less +1 -1
  93. package/src/sap/ui/vbm/themes/sap_belize_hcb/library.source.less +1 -1
  94. package/src/sap/ui/vbm/themes/sap_belize_hcw/library.source.less +1 -1
  95. package/src/sap/ui/vbm/themes/sap_belize_plus/library.source.less +1 -1
  96. package/src/sap/ui/vbm/themes/sap_bluecrystal/library.source.less +1 -1
  97. package/src/sap/ui/vbm/themes/sap_fiori_3/library.source.less +1 -1
  98. package/src/sap/ui/vbm/themes/sap_fiori_3_dark/library.source.less +1 -1
  99. package/src/sap/ui/vbm/themes/sap_fiori_3_hcb/library.source.less +1 -1
  100. package/src/sap/ui/vbm/themes/sap_fiori_3_hcw/library.source.less +1 -1
  101. package/src/sap/ui/vbm/themes/sap_hcb/library.source.less +1 -1
  102. package/src/sap/ui/vbm/themes/sap_horizon/library.source.less +8 -0
  103. package/ui5.yaml +3 -1
  104. package/src/sap/ui/vbm/adapter3d/thirdparty/html2canvas.js +0 -6
@@ -1,17 +1,18 @@
1
- // ...........................................................................//
2
- // Actions namespace.........................................................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
6
+ // Actions namespace
4
7
  // Author: Ulrich Roegelein
8
+ // helper functions
9
+ // actions provider
5
10
 
6
- // ...........................................................................//
7
- // helper functions..........................................................//
8
-
9
- // ...........................................................................//
10
- // actions provider..........................................................//
11
- // ...........................................................................//
11
+ sap.ui.define(["./sapvbi"]
12
+ , function() {
13
+ "use strict";
12
14
 
13
15
  VBI.Actions = function() {
14
- "use strict";
15
16
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
16
17
  var actions = {};
17
18
  actions.m_actions = []; // array of actions
@@ -178,3 +179,5 @@ VBI.Actions = function() {
178
179
 
179
180
  return actions;
180
181
  };
182
+
183
+ });
@@ -1,17 +1,18 @@
1
- // ...........................................................................//
2
- // Automations namespace.........................................................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
6
+ // Automations namespace
4
7
  // Author: Juergen Gatter
8
+ // helper functions
9
+ // automations provider
5
10
 
6
- // ...........................................................................//
7
- // helper functions..........................................................//
8
-
9
- // ...........................................................................//
10
- // automations provider......................................................//
11
- // ...........................................................................//
11
+ sap.ui.define(["./sapvbi"]
12
+ , function() {
13
+ "use strict";
12
14
 
13
15
  VBI.Automations = function() {
14
- "use strict";
15
16
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
16
17
  var automations = {};
17
18
  automations.m_automations = []; // array of automations
@@ -133,7 +134,6 @@ VBI.Automations = function() {
133
134
  };
134
135
 
135
136
  VBI.FlyToHandler = function(dat) {
136
- "use strict";
137
137
  var flyToHandler = {};
138
138
  flyToHandler.cnt = 0;
139
139
  for (var i = 0; i < dat.length; ++i) {
@@ -188,7 +188,6 @@ VBI.FlyToHandler = function(dat) {
188
188
  };
189
189
 
190
190
  VBI.ContextMenuHandler = function(dat) {
191
- "use strict";
192
191
  var contextMenuHandler = {};
193
192
  contextMenuHandler.cnt = 0;
194
193
  for (var i = 0; i < dat.length; ++i) {
@@ -234,7 +233,6 @@ VBI.ContextMenuHandler = function(dat) {
234
233
  // handler for triggering object creations...................................//
235
234
 
236
235
  VBI.ObjectCreationHandler = function(dat) {
237
- "use strict";
238
236
  var handler = {};
239
237
  handler.cnt = 0;
240
238
  handler.m_Ctx = null;
@@ -291,7 +289,6 @@ VBI.ObjectCreationHandler = function(dat) {
291
289
  // handler for triggering a roundtrip by raising an action...................//
292
290
 
293
291
  VBI.LoopBackHandler = function(dat) {
294
- "use strict";
295
292
  var handler = {};
296
293
  handler.cnt = 0;
297
294
  handler.m_Ctx = null;
@@ -331,3 +328,5 @@ VBI.LoopBackHandler = function(dat) {
331
328
 
332
329
  return handler;
333
330
  };
331
+
332
+ });
@@ -1,10 +1,16 @@
1
- // ...........................................................................//
2
- // configuration object......................................................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
6
+ // configuration object
4
7
  // Author: Martina Gozlinski
5
8
 
6
- VBI.Configurations = function() {
9
+ sap.ui.define(["./sapvbi"]
10
+ , function() {
7
11
  "use strict";
12
+
13
+ VBI.Configurations = function() {
8
14
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
9
15
  var configurations = {};
10
16
 
@@ -41,3 +47,5 @@ VBI.Configurations = function() {
41
47
 
42
48
  return configurations;
43
49
  };
50
+
51
+ });
@@ -1,18 +1,23 @@
1
- // ...........................................................................//
2
- // DataProvider and DataType namespace.......................................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
6
+ // DataProvider and DataType namespace
4
7
  // Author: Ulrich Roegelein
5
8
 
9
+ sap.ui.define(["./sapvbi"]
10
+ , function() {
11
+ "use strict";
12
+
6
13
  // ...........................................................................//
7
14
  // helper functions..........................................................//
8
15
  VBI.isInt = function(input) {
9
- "use strict";
10
16
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
11
17
  return ((input - 0) == input && input % 1 == 0);
12
18
  };
13
19
 
14
20
  VBI.IndexOf = function(array, ele) {
15
- "use strict";
16
21
  // to not use indexof in an array, we do this function here...............//
17
22
  var len = array.length;
18
23
  for (var nJ = 0; nJ < len; ++nJ) {
@@ -42,7 +47,6 @@ VBI.Types = {
42
47
  // from string conversions................................................//
43
48
 
44
49
  string2bool: function(a) {
45
- "use strict";
46
50
  if (typeof a == "boolean") {
47
51
  return a;
48
52
  }
@@ -55,7 +59,6 @@ VBI.Types = {
55
59
  },
56
60
 
57
61
  string2vector: function(a) {
58
- "use strict";
59
62
  var error = false;
60
63
  var array = a.split(';');
61
64
  for (var nJ = 0, len = array.length; nJ < len; ++nJ) {
@@ -69,7 +72,6 @@ VBI.Types = {
69
72
  },
70
73
 
71
74
  stringarray2vectorarray: function(a) {
72
- "use strict";
73
75
  var result = [];
74
76
  // we expect an array of string arrays
75
77
  for (var nI = 0, len = a.length; nI < len; ++nI) {
@@ -83,7 +85,6 @@ VBI.Types = {
83
85
  },
84
86
 
85
87
  string2rgba: function(a) {
86
- "use strict";
87
88
  // return an rgba array [r,g,b,a,x] plus a 5ths component that defines that an alpha was set
88
89
  var cache, rgb;
89
90
  // CSS color formats
@@ -176,13 +177,11 @@ VBI.Types = {
176
177
  },
177
178
 
178
179
  string2color: function(a) {
179
- "use strict";
180
180
  var rgba = this.string2rgba(a);
181
181
  return "rgba(" + rgba[0] + "," + rgba[1] + "," + rgba[2] + "," + rgba[3] + ")";
182
182
  },
183
183
 
184
184
  string2rhls: function(a) {
185
- "use strict";
186
185
  // input: RHLS(270;0.6;0.8)
187
186
  // input: RHLSA(270;0.6;0.8;0.5)
188
187
 
@@ -207,7 +206,6 @@ VBI.Types = {
207
206
  },
208
207
 
209
208
  color2array: function(a) {
210
- "use strict";
211
209
  // input rgba(128,128,128,1.0)
212
210
  // output [0.5,0.5,0.5,1.0] // red, green, blue, alpha
213
211
 
@@ -222,7 +220,6 @@ VBI.Types = {
222
220
  },
223
221
 
224
222
  string2long: function(a) {
225
- "use strict";
226
223
  if (typeof a == "boolean") {
227
224
  return a ? 1 : 0;
228
225
  }
@@ -230,7 +227,6 @@ VBI.Types = {
230
227
  },
231
228
 
232
229
  string2float: function(a) {
233
- "use strict";
234
230
  if (typeof a == "boolean") {
235
231
  return a ? 1.0 : 0.0;
236
232
  }
@@ -241,12 +237,10 @@ VBI.Types = {
241
237
  // to string conversions..................................................//
242
238
 
243
239
  float2string: function(a) {
244
- "use strict";
245
240
  return a.toString();
246
241
  },
247
242
 
248
243
  vector2string: function(a) {
249
- "use strict";
250
244
  // merge to a semicolon separated string...............................//
251
245
  var tmp = "";
252
246
  for (var nJ = 0; nJ < a.length; ++nJ) {
@@ -259,7 +253,6 @@ VBI.Types = {
259
253
  },
260
254
 
261
255
  color2string: function(a) {
262
- "use strict";
263
256
  var res;
264
257
  if ((res = /^rgba\(([\d]+),([\d]+),([\d]+),([\d]+|[\d]*.[\d]+)\)/.exec(a))) {
265
258
  res = [
@@ -271,12 +264,10 @@ VBI.Types = {
271
264
  },
272
265
 
273
266
  long2float: function(a) {
274
- "use strict";
275
267
  return parseFloat(a, 10);
276
268
  },
277
269
 
278
270
  float2long: function(a) {
279
- "use strict";
280
271
  return parseInt(a, 10);
281
272
  }
282
273
  };
@@ -286,7 +277,6 @@ VBI.Types = {
286
277
  // ...........................................................................//
287
278
 
288
279
  VBI.DataTypeProvider = function() {
289
- "use strict";
290
280
  var datatypeprovider = {};
291
281
  datatypeprovider.m_datatypenodes = [];
292
282
  datatypeprovider.vbiclass = "DataTypeProvider";
@@ -713,7 +703,6 @@ VBI.DataTypeProvider = function() {
713
703
  // ...........................................................................//
714
704
 
715
705
  VBI.DataProvider = function() {
716
- "use strict";
717
706
  var dataprovider = {};
718
707
 
719
708
  // node, element, attribute
@@ -1879,7 +1868,6 @@ VBI.DataProvider = function() {
1879
1868
  // data adaptors.............................................................//
1880
1869
 
1881
1870
  VBI.Adaptor = function(ctx) {
1882
- "use strict";
1883
1871
  var Ctx = ctx; // current session context................................//
1884
1872
 
1885
1873
  this.RecursiveLoadElement = function(de, odn, dtn) {
@@ -1997,3 +1985,5 @@ VBI.Adaptor = function(ctx) {
1997
1985
  return vbiDat;
1998
1986
  };
1999
1987
  };
1988
+
1989
+ });
@@ -1,11 +1,11 @@
1
- // ...........................................................................//
2
- // this module does the events implementation on a scene.....................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
6
+ // this module does the events implementation on a scene
4
7
  // Author: Ulrich Roegelein
5
-
6
- // ...........................................................................//
7
8
  // vb sap events:
8
-
9
9
  // sapdown // touchstart, mousedown,
10
10
  // sapmove // mousemove
11
11
  // sapleave // mouseleave
@@ -13,15 +13,16 @@
13
13
  // sapclick
14
14
  // sapdblclick // double mouse click
15
15
  // sapsecclick // contextmenu rightclick taphold
16
-
17
16
  // // sapzoom
18
17
  // // saprotate
19
18
 
19
+ sap.ui.define(["./sapvbi"]
20
+ , function() {
21
+ "use strict";
22
+
20
23
  // ...........................................................................//
21
24
  // pointer events............................................................//
22
-
23
25
  VBI.ScenePointerEvents = function(scene, ele) {
24
- "use strict";
25
26
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
26
27
  // gesture support........................................................//
27
28
  scene.m_Gesture = null; // we move the gesture to the scene as state...//
@@ -234,7 +235,6 @@ VBI.ScenePointerEvents = function(scene, ele) {
234
235
  // ...........................................................................//
235
236
  // touch events..............................................................//
236
237
  VBI.SceneTouchEvents = function(scene, ele) {
237
- "use strict";
238
238
  var isNavigationDisabled = scene.m_SuppressedNavigation.move && scene.m_SuppressedNavigation.zoom;
239
239
 
240
240
  this.m_Events = [
@@ -724,7 +724,6 @@ VBI.SceneTouchEvents = function(scene, ele) {
724
724
  // ...........................................................................//
725
725
  // scene events .............................................................//
726
726
  VBI.SceneEvent = function(scene, ele) {
727
- "use strict";
728
727
  // device specific additional handlers....................................//
729
728
  this.m_DeviceHandlers = [];
730
729
  VBI.m_bMouseSupported = false;
@@ -1840,7 +1839,6 @@ VBI.SceneEvent = function(scene, ele) {
1840
1839
  };
1841
1840
 
1842
1841
  VBI.ThumbnailEvent = function(scene, ele) {
1843
- "use strict";
1844
1842
  // device specific additional handlers....................................//
1845
1843
  this.m_DeviceHandlers = [];
1846
1844
 
@@ -2041,3 +2039,5 @@ VBI.ThumbnailEvent = function(scene, ele) {
2041
2039
 
2042
2040
  this.subscribe();
2043
2041
  };
2042
+
2043
+ });
@@ -1,10 +1,15 @@
1
- // ...........................................................................//
2
- // sapgeolocation.js.........................................................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
4
6
  // Author: Ulrich Roegelein
5
7
 
6
- VBI.GeoLocation = function() {
8
+ sap.ui.define(["./sapvbi"]
9
+ , function() {
7
10
  "use strict";
11
+
12
+ VBI.GeoLocation = function() {
8
13
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
9
14
  var geolocation = {};
10
15
  geolocation.vbiclass = "GeoLocation";
@@ -83,3 +88,5 @@ VBI.GeoLocation = function() {
83
88
 
84
89
  return geolocation;
85
90
  };
91
+
92
+ });
@@ -1,12 +1,17 @@
1
- // ...........................................................................//
2
- // math library for geo......................................................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
6
+ // math library for geo
4
7
  // Author: Ulrich Roegelein
8
+ // !remark!, all arguments work with radians
5
9
 
6
- // !remark!, all arguments work with radians.................................//
10
+ sap.ui.define(["./sapvbi"]
11
+ , function() {
12
+ "use strict";
7
13
 
8
14
  VBI.MathLib = (function() {
9
- "use strict";
10
15
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
11
16
  var mathlib = {};
12
17
 
@@ -330,3 +335,5 @@ VBI.MathLib = (function() {
330
335
 
331
336
  return mathlib;
332
337
  })();
338
+
339
+ });
@@ -1,8 +1,15 @@
1
- // ...........................................................................//
2
- // tools extensions for VBI namespace........................................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
4
- VBI.QuadTree = function(maxQuadItems, maxLOD, rect) {
6
+ // tools extensions for VBI namespace
7
+
8
+ sap.ui.define(["./sapvbi"]
9
+ , function() {
5
10
  "use strict";
11
+
12
+ VBI.QuadTree = function(maxQuadItems, maxLOD, rect) {
6
13
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
7
14
  // quadrants
8
15
  // ---------
@@ -220,3 +227,5 @@ VBI.QuadTree = function(maxQuadItems, maxLOD, rect) {
220
227
  })()
221
228
  };
222
229
  };
230
+
231
+ });
@@ -1,3 +1,12 @@
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
5
+
6
+ sap.ui.define(["./sapvbi"]
7
+ , function() {
8
+ "use strict";
9
+
1
10
  // init creatable objects in vbi context
2
11
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
3
12
  VBI.Tex = null; // texture object
@@ -12,7 +21,6 @@ VBI.Hm = null; // heatmap object
12
21
  // hook into webgl...........................................................//
13
22
 
14
23
  VBI.Hook = (function() {
15
- "use strict";
16
24
  // override getExtension for different vendors............................//
17
25
  if (window.WebGLRenderingContext) {
18
26
  // hook get the rendercontect getExtension.............................//
@@ -38,16 +46,15 @@ VBI.Hook = (function() {
38
46
  // add helper function.................................................//
39
47
  WebGLRenderingContext.prototype.getExtensions = function(spec) {
40
48
  // try to get needed extensions
41
- return this.getExtension('OES_texture_float');
49
+ return this.getExtension('OES_texture_float');
42
50
 
43
51
  // this extension tells if the device supports render to float texture, but mobile browsers don't report it yet
44
- // this.getExtension('WEBGL_color_buffer_float');
52
+ // this.getExtension('WEBGL_color_buffer_float');
45
53
  };
46
54
  }
47
55
  })();
48
56
 
49
57
  VBI.Shader = (function() {
50
- "use strict";
51
58
  function Shader(gl, vs, fs) {
52
59
  this.m_GL = gl; // store gl object
53
60
  this.m_UL = {}; // variable locations in program
@@ -107,7 +114,6 @@ VBI.Shader = (function() {
107
114
  })();
108
115
 
109
116
  VBI.FB = (function() {
110
- "use strict";
111
117
  function FB(gl) {
112
118
  this.m_GL = gl;
113
119
  this.m_FB = this.m_GL.createFramebuffer();
@@ -135,7 +141,7 @@ VBI.FB = (function() {
135
141
  if (status !== this.m_GL.FRAMEBUFFER_COMPLETE) {
136
142
  return null;
137
143
  }
138
-
144
+
139
145
  return this;
140
146
  };
141
147
 
@@ -143,7 +149,6 @@ VBI.FB = (function() {
143
149
  })();
144
150
 
145
151
  VBI.Tex = (function() {
146
- "use strict";
147
152
  function Tex(gl, params) {
148
153
  var tmp;
149
154
  this.m_GL = gl;
@@ -203,7 +208,6 @@ VBI.Tex = (function() {
203
208
  })();
204
209
 
205
210
  VBI.Ro = (function() {
206
- "use strict";
207
211
  function Ro(gl, width, height) {
208
212
  this.m_GL = gl;
209
213
  this.m_W = width;
@@ -219,7 +223,7 @@ VBI.Ro = (function() {
219
223
  this.m_Tex = new VBI.Tex(this.m_GL, {
220
224
  type: texType
221
225
  });
222
-
226
+
223
227
  this.m_Tex.BindTex(0);
224
228
  this.m_Tex.AdjustSize(width, height);
225
229
  this.m_Tex.SetFilterNearest();
@@ -232,15 +236,15 @@ VBI.Ro = (function() {
232
236
  // check if render to float texture is supported
233
237
  if (!this.m_FB.SetTex(this.m_Tex)) {
234
238
  this.m_FB.UnBindFB();
235
-
239
+
236
240
  // render to float texture not supported => try to create integer texture and then render to it
237
241
  //jQuery.sap.log.error("Render to float texture not supported => creating integer texture");
238
-
242
+
239
243
  // create an integer texture
240
244
  this.m_Tex = new VBI.Tex(this.m_GL, {
241
245
  type: null
242
246
  });
243
-
247
+
244
248
  this.m_Tex.BindTex(0);
245
249
  this.m_Tex.AdjustSize(width, height);
246
250
  this.m_Tex.SetFilterNearest();
@@ -281,7 +285,6 @@ VBI.Ro = (function() {
281
285
 
282
286
  // values for heatmap
283
287
  VBI.Vals = (function() {
284
- "use strict";
285
288
  function Vals(gl, width, height) {
286
289
  this.m_GL = gl;
287
290
 
@@ -292,7 +295,7 @@ VBI.Vals = (function() {
292
295
  this.m_W = width;
293
296
  this.m_H = height;
294
297
 
295
- this.m_Shader = new VBI.Shader(this.m_GL,
298
+ this.m_Shader = new VBI.Shader(this.m_GL,
296
299
  "uniform vec4 uTM;" +
297
300
  "attribute vec4 aPos;" +
298
301
  "attribute float aValue;" +
@@ -421,7 +424,6 @@ VBI.Vals = (function() {
421
424
  })();
422
425
 
423
426
  VBI.Hm = (function() {
424
- "use strict";
425
427
  function Hm(oArgs) {
426
428
  var calcAlpha; // shader fragment to calculate an alpha
427
429
  var calcCol; // shader fragment to calculate the color
@@ -496,13 +498,13 @@ VBI.Hm = (function() {
496
498
  scene.RenderAsync(false);
497
499
  }
498
500
 
499
- calcCol =
501
+ calcCol =
500
502
  "uniform sampler2D colTex; " +
501
503
  "vec3 calcCol( float g ){ " +
502
504
  " return texture2D( colTex, vec2( g, 0.5 )).rgb; " +
503
505
  "}";
504
506
  } else {
505
- calcCol =
507
+ calcCol =
506
508
  "vec3 calcCol( float g ){ " +
507
509
  " return smoothstep( vec3( 0.0, 0.0, 1.0 ), vec3( 1.0, 1.0, 0.0 ), vec3( g ) ); " +
508
510
  "}";
@@ -510,19 +512,19 @@ VBI.Hm = (function() {
510
512
 
511
513
  // assemble alpha usage shader code
512
514
  if (oArgs.alpha) {
513
- calcAlpha =
515
+ calcAlpha =
514
516
  "vec4 calcAlpha(vec3 c,float i){ " +
515
517
  " float a = smoothstep(" + (oArgs.alphaBounds[0].toFixed(8)) + "," + (oArgs.alphaBounds[1].toFixed(8)) + ", pow(i, 1.0)); " +
516
518
  " return vec4( c*a, a); " +
517
519
  "}";
518
520
  } else {
519
- calcAlpha =
521
+ calcAlpha =
520
522
  "vec4 calcAlpha(vec3 c, float i){ " +
521
523
  " return vec4(c, 1.0);" +
522
524
  "}";
523
525
  }
524
526
 
525
- var fsVars =
527
+ var fsVars =
526
528
  "#ifdef GL_FRAGMENT_PRECISION_HIGH \n" +
527
529
  " precision highp int;" +
528
530
  " precision highp float; \n" +
@@ -532,8 +534,8 @@ VBI.Hm = (function() {
532
534
  "#endif \n" +
533
535
  "uniform sampler2D src;" +
534
536
  "varying vec2 txy;";
535
-
536
- var fsMain =
537
+
538
+ var fsMain =
537
539
  "void main(){ " +
538
540
  " float f = clamp( texture2D(src, txy).r, 0.0, 1.0 ); " +
539
541
  " vec3 color = calcCol(pow(f, " + (this.m_cFunc) + ")); " +
@@ -541,13 +543,13 @@ VBI.Hm = (function() {
541
543
  "}";
542
544
 
543
545
  // create the shader that does the output to the canvas, it uses the blue channel for color mapping
544
- this.m_Shader = new VBI.Shader(this.m_GL,
546
+ this.m_Shader = new VBI.Shader(this.m_GL,
545
547
  "attribute vec4 pos; " +
546
548
  "varying vec2 txy; " +
547
549
  "void main(){ " +
548
550
  " txy = pos.xy * 0.5 + 0.5; " +
549
551
  " gl_Position = pos; " +
550
- "}",
552
+ "}",
551
553
  fsVars + calcCol + "\n" + calcAlpha + fsMain);
552
554
 
553
555
  if (this.m_W == null) {
@@ -645,6 +647,7 @@ VBI.Hm = (function() {
645
647
  })();
646
648
 
647
649
  VBI.CreateHM = function(params) {
648
- "use strict";
649
650
  return new VBI.Hm(params);
650
651
  };
652
+
653
+ });
@@ -1,14 +1,21 @@
1
- // ...........................................................................//
2
- // this module does the label handling.......................................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
6
+ // this module does the label handling
4
7
  // Author: Martina Gozlinski, extraction by Jürgen
8
+ // First part enriches scene with label specific functions
9
+ // Second part consists of the VBI.Label object, formerly part of vobase
10
+
11
+ sap.ui.define([
12
+ "sap/ui/core/IconPool",
13
+ "./sapvbi"
14
+ ], function(IconPool) {
15
+ "use strict"
5
16
 
6
- // ...........................................................................//
7
- // First part enriches scene with label specific functions //
8
- // Second part consists of the VBI.Label object, formerly part of vobase //
9
17
  /* global VBI */// declare unusual global vars for JSLint/SAPUI5 validation
10
18
  VBI.addSceneLabelFunctions = function(scene) {
11
- "use strict";
12
19
  scene.InternalDrawLabelTexts = function(dc, label, textcolor, substrings) {
13
20
  for (var nJ = 0; nJ < label.m_Pos.length; ++nJ) {
14
21
  for (var nZ = 0; nZ < label.m_Pos[nJ].length; nZ++) {
@@ -115,8 +122,7 @@ VBI.addSceneLabelFunctions = function(scene) {
115
122
  }
116
123
  // rectangle for icon
117
124
  if (label.m_Icon) {
118
- jQuery.sap.require("sap.ui.core.IconPool");
119
- label.m_IcInfo = sap.ui.core.IconPool.getIconInfo(label.m_Icon);
125
+ label.m_IcInfo = IconPool.getIconInfo(label.m_Icon);
120
126
  if (label.m_IcInfo) {
121
127
  var iconPosX = (label.m_Align == 7 && label.m_Arrow) ? startX : startX + width;
122
128
  dc.fillStyle = label.m_IcBgrdCol;
@@ -235,8 +241,7 @@ VBI.addSceneLabelFunctions = function(scene) {
235
241
  }
236
242
  // rectangle for icon
237
243
  if (label.m_Icon) {
238
- jQuery.sap.require("sap.ui.core.IconPool");
239
- label.m_IcInfo = sap.ui.core.IconPool.getIconInfo(label.m_Icon);
244
+ label.m_IcInfo = IconPool.getIconInfo(label.m_Icon);
240
245
  if (label.m_IcInfo) {
241
246
  var iconPosX = (label.m_Align == 7 && label.m_Arrow) ? startX : startX + width;
242
247
  dc.fillStyle = label.m_IcBgrdCol;
@@ -361,7 +366,6 @@ VBI.addSceneLabelFunctions = function(scene) {
361
366
  // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> //
362
367
 
363
368
  VBI.Label = function(label, nIndex, recalc, posarray, rcbox, aIO) {
364
- "use strict";
365
369
  this.m_bAligned = false;
366
370
  this.mIndex = nIndex;
367
371
  this.m_aIO = aIO;
@@ -555,3 +559,5 @@ VBI.Label = function(label, nIndex, recalc, posarray, rcbox, aIO) {
555
559
 
556
560
  return this;
557
561
  };
562
+
563
+ });