@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,21 @@
1
- // ...........................................................................//
2
- // utilities object..........................................................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
6
+ // utilities object
4
7
  // Author: Ulrich Roegelein
8
+ // this module is just a utility collection
5
9
 
6
- // ...........................................................................//
7
- // this module is just a utility collection..................................//
10
+ sap.ui.define(["./sapvbi"]
11
+ , function() {
12
+ "use strict";
8
13
 
9
14
  VBI.Utilities = VBI.Utilities || {};
10
15
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
11
16
  // ...........................................................................//
12
17
  // HTMLCanvasElement element prototyes.......................................//
13
18
  HTMLCanvasElement.prototype.getPixelWidth = function() {
14
- "use strict";
15
19
  if (this.m_pixelWidth) {
16
20
  return this.m_pixelWidth;
17
21
  }
@@ -23,7 +27,6 @@ HTMLCanvasElement.prototype.getPixelWidth = function() {
23
27
  };
24
28
 
25
29
  HTMLCanvasElement.prototype.getPixelHeight = function() {
26
- "use strict";
27
30
  if (this.m_pixelHeight) {
28
31
  return this.m_pixelHeight;
29
32
  }
@@ -36,7 +39,6 @@ HTMLCanvasElement.prototype.getPixelHeight = function() {
36
39
  };
37
40
 
38
41
  HTMLCanvasElement.prototype.getPixelLeft = function() {
39
- "use strict";
40
42
  if (this.m_pixelLeft) {
41
43
  return this.m_pixelLeft;
42
44
  }
@@ -47,7 +49,6 @@ HTMLCanvasElement.prototype.getPixelLeft = function() {
47
49
  };
48
50
 
49
51
  HTMLCanvasElement.prototype.getPixelTop = function() {
50
- "use strict";
51
52
  if (this.m_pixelTop) {
52
53
  return this.m_pixelTop;
53
54
  }
@@ -60,7 +61,6 @@ HTMLCanvasElement.prototype.getPixelTop = function() {
60
61
  };
61
62
 
62
63
  HTMLCanvasElement.prototype.setPixelWidth = function(val) {
63
- "use strict";
64
64
  this.m_pixelWidth = val;
65
65
 
66
66
  if (this.style.pixelWidth !== undefined) {
@@ -71,7 +71,6 @@ HTMLCanvasElement.prototype.setPixelWidth = function(val) {
71
71
  };
72
72
 
73
73
  HTMLCanvasElement.prototype.setPixelHeight = function(val) {
74
- "use strict";
75
74
  this.m_pixelHeight = val;
76
75
 
77
76
  if (this.style.pixelHeight !== undefined) {
@@ -82,7 +81,6 @@ HTMLCanvasElement.prototype.setPixelHeight = function(val) {
82
81
  };
83
82
 
84
83
  HTMLCanvasElement.prototype.setPixelLeft = function(val) {
85
- "use strict";
86
84
  this.m_pixelLeft = val;
87
85
 
88
86
  if (this.style.pixelLeft !== undefined) {
@@ -93,7 +91,6 @@ HTMLCanvasElement.prototype.setPixelLeft = function(val) {
93
91
  };
94
92
 
95
93
  HTMLCanvasElement.prototype.setPixelTop = function(val) {
96
- "use strict";
97
94
  this.m_pixelTop = val;
98
95
  if (this.style.pixelTop !== undefined) {
99
96
  this.style.pixelTop = val;
@@ -106,7 +103,6 @@ HTMLCanvasElement.prototype.setPixelTop = function(val) {
106
103
  // create a dummy element....................................................//
107
104
 
108
105
  VBI.Utilities.CreateWifiObject = function() {
109
- "use strict";
110
106
  var newElement = document.createElement('object');
111
107
  if (!newElement) {
112
108
  return null;
@@ -117,7 +113,6 @@ VBI.Utilities.CreateWifiObject = function() {
117
113
  };
118
114
 
119
115
  VBI.Utilities.CreateDOMElement = function(type, id, width, height) {
120
- "use strict";
121
116
  var newElement = document.createElement(type);
122
117
  newElement.style.height = width ? width : "1px";
123
118
  newElement.style.width = height ? height : "1px";
@@ -127,7 +122,6 @@ VBI.Utilities.CreateDOMElement = function(type, id, width, height) {
127
122
  };
128
123
 
129
124
  VBI.Utilities.GetDOMElement = function(args) {
130
- "use strict";
131
125
  var elements = [];
132
126
 
133
127
  for (var i = 0, len = arguments.length; i < len; i++) {
@@ -147,7 +141,6 @@ VBI.Utilities.GetDOMElement = function(args) {
147
141
  // create a new DOM element..................................................//
148
142
 
149
143
  VBI.Utilities.CreateDOMVBIDivElement = function(id, width, height) {
150
- "use strict";
151
144
  // <div id="myDiv" style="overflow:hidden;position:absolute;left:0px;top:0px;width:300px;height:300px">
152
145
 
153
146
  var newElement = document.createElement('div');
@@ -164,7 +157,6 @@ VBI.Utilities.CreateDOMVBIDivElement = function(id, width, height) {
164
157
  };
165
158
 
166
159
  VBI.Utilities.Create3DSceneDiv = function(id) {
167
- "use strict";
168
160
  var newElement = document.createElement('div');
169
161
  newElement.setAttribute("role", sap.ui.core.AccessibleRole.Img);
170
162
 
@@ -180,7 +172,6 @@ VBI.Utilities.Create3DSceneDiv = function(id) {
180
172
  };
181
173
 
182
174
  VBI.Utilities.Create3DSceneCanvas = function(id, width, height, zindex, tabindex, isNonDOM) {
183
- "use strict";
184
175
  var newElement = document.createElement('canvas');
185
176
  newElement.setAttribute("role", sap.ui.core.AccessibleRole.Img);
186
177
 
@@ -212,7 +203,6 @@ VBI.Utilities.Create3DSceneCanvas = function(id, width, height, zindex, tabindex
212
203
  };
213
204
 
214
205
  VBI.Utilities.CreateGeoSceneCanvas = function(id, width, height, tabindex, isNonDOM, addClasses, ariaLabel) {
215
- "use strict";
216
206
  var newElement = document.createElement('canvas');
217
207
  newElement.setAttribute("role", sap.ui.core.AccessibleRole.Img);
218
208
 
@@ -260,7 +250,6 @@ VBI.Utilities.Align = [
260
250
  ];
261
251
 
262
252
  VBI.Utilities.CreateCaption = function(id, text, left, top, right, bottom, tooltip, design, level, align) {
263
- "use strict";
264
253
  // create the frame.......................................................//
265
254
  var newElement = document.createElement('div');
266
255
  newElement.setAttribute("role", sap.ui.core.AccessibleRole.Note);
@@ -282,12 +271,11 @@ VBI.Utilities.CreateCaption = function(id, text, left, top, right, bottom, toolt
282
271
  }
283
272
 
284
273
  newElement.className = "vbi-2d-caption vbi-2d-common";
285
- newElement.innerHTML = text;
274
+ newElement.innerHTML = jQuery.sap.encodeHTML(text);
286
275
  return newElement;
287
276
  };
288
277
 
289
278
  VBI.Utilities.CreateLabel = function(id, text, left, top, right, bottom, tooltip, align) {
290
- "use strict";
291
279
  // create the frame.......................................................//
292
280
  var newElement = document.createElement('div');
293
281
  newElement.setAttribute("role", sap.ui.core.AccessibleRole.Description);
@@ -299,12 +287,11 @@ VBI.Utilities.CreateLabel = function(id, text, left, top, right, bottom, tooltip
299
287
  newElement.style.textAlign = VBI.Utilities.Align[align];
300
288
  newElement.style.title = tooltip;
301
289
  newElement.className = "vbi-2d-label vbi-2d-common";
302
- newElement.innerHTML = text;
290
+ newElement.innerHTML = jQuery.sap.encodeHTML(text);
303
291
  return newElement;
304
292
  };
305
293
 
306
294
  VBI.Utilities.CreateLink = function(id, text, left, top, right, bottom, href, tooltip, align) {
307
- "use strict";
308
295
  // create the frame.......................................................//
309
296
  var newElement = document.createElement('a');
310
297
  newElement.setAttribute("role", sap.ui.core.AccessibleRole.Link);
@@ -317,12 +304,11 @@ VBI.Utilities.CreateLink = function(id, text, left, top, right, bottom, href, to
317
304
  newElement.className = "vbi-2d-link vbi-2d-common";
318
305
  newElement.href = href ? href : "javascrip" + "t:void(0)"; // separated to fool ESLint
319
306
  newElement.title = tooltip;
320
- newElement.innerHTML = text;
307
+ newElement.innerHTML = jQuery.sap.encodeHTML(text);
321
308
  return newElement;
322
309
  };
323
310
 
324
311
  VBI.Utilities.CreateImage = function(id, img, left, top, right, bottom, tooltip, align) {
325
- "use strict";
326
312
  // image is assumed to be a dom element located in the resources..........//
327
313
  // var newElement = document.createElement('img');
328
314
  var newElement = img.cloneNode(true);
@@ -339,7 +325,6 @@ VBI.Utilities.CreateImage = function(id, img, left, top, right, bottom, tooltip,
339
325
  };
340
326
 
341
327
  VBI.Utilities.CreateButton = function(id, text, left, top, right, bottom, tooltip, align) {
342
- "use strict";
343
328
  // create the frame.......................................................//
344
329
  var newElement = document.createElement('button');
345
330
  newElement.id = id;
@@ -349,13 +334,12 @@ VBI.Utilities.CreateButton = function(id, text, left, top, right, bottom, toolti
349
334
  newElement.style.height = (bottom - top).toString() + "px";
350
335
  newElement.style.textAlign = VBI.Utilities.Align[align];
351
336
  newElement.className = "vbi-2d-button vbi-2d-common";
352
- newElement.innerHTML = text;
337
+ newElement.innerHTML = jQuery.sap.encodeHTML(text);
353
338
  newElement.title = tooltip;
354
339
  return newElement;
355
340
  };
356
341
 
357
342
  VBI.Utilities.CreateContainer = function(id, key, left, top, width, height, tooltip, bOmitClass) {
358
- "use strict";
359
343
  // create the container...................................................//
360
344
  var newElement = document.createElement('div');
361
345
  newElement.setAttribute("role", sap.ui.core.AccessibleRole.Group);
@@ -375,7 +359,6 @@ VBI.Utilities.CreateContainer = function(id, key, left, top, width, height, tool
375
359
  // ...........................................................................//
376
360
  // callout container.........................................................//
377
361
  VBI.Utilities.CreateDetailPhone = function(id, left, top, width, height, titletext, padding) {
378
- "use strict";
379
362
  // create the detail frame................................................//
380
363
  var detail = document.createElement('div');
381
364
  detail.setAttribute("role", sap.ui.core.AccessibleRole.Directory);
@@ -408,7 +391,7 @@ VBI.Utilities.CreateDetailPhone = function(id, left, top, width, height, titlete
408
391
  title.setAttribute("role", sap.ui.core.AccessibleRole.Heading);
409
392
  title.id = id + "-window-title";
410
393
  title.className = "vbi-detail-title-phone";
411
- title.innerHTML = titletext;
394
+ title.innerHTML = jQuery.sap.encodeHTML(titletext);
412
395
  header.appendChild(title);
413
396
 
414
397
  // create the close.......................................................//
@@ -440,7 +423,6 @@ VBI.Utilities.CreateDetailPhone = function(id, left, top, width, height, titlete
440
423
  };
441
424
 
442
425
  VBI.Utilities.CreateDetail = function(id, left, top, width, height, titletext, padding) {
443
- "use strict";
444
426
  if (VBI.m_bIsPhone) {
445
427
  return (VBI.Utilities.CreateDetailPhone(id, left, top, width, height, titletext, padding));
446
428
  }
@@ -495,7 +477,7 @@ VBI.Utilities.CreateDetail = function(id, left, top, width, height, titletext, p
495
477
  title.setAttribute("role", sap.ui.core.AccessibleRole.Heading);
496
478
  title.id = id + "-window-title";
497
479
  title.className = "vbi-detail-title";
498
- title.innerHTML = titletext;
480
+ title.innerHTML = jQuery.sap.encodeHTML(titletext);
499
481
  header.appendChild(title);
500
482
 
501
483
  // create the close.......................................................//
@@ -558,14 +540,11 @@ VBI.Utilities.CreateDetail = function(id, left, top, width, height, titletext, p
558
540
  };
559
541
 
560
542
  VBI.Utilities.CreateLegendPhone = function(id, left, top, width, height, titletext, padding) {
561
- "use strict";
562
-
563
543
  };
564
544
 
565
545
  VBI.Utilities.CreateLegend = function(id, top, titletext, padding, bClickRow) {
566
- "use strict";
567
546
  // if (VBI.m_bIsPhone)
568
- // return ( VBI.Utilities.CreateLegendPhone( id, right, top, titletext, padding ) );
547
+ // return ( VBI.Utilities.CreateLegendPhone( id, right, top, titletext, padding ) );
569
548
  // create the legend frame................................................//
570
549
  var legend = document.createElement('div');
571
550
  legend.setAttribute("role", sap.ui.core.AccessibleRole.Group);
@@ -623,7 +602,7 @@ VBI.Utilities.CreateLegend = function(id, top, titletext, padding, bClickRow) {
623
602
  title.setAttribute("role", sap.ui.core.AccessibleRole.Heading);
624
603
  title.id = id + "-title";
625
604
  title.className = "vbi-legend-title";
626
- title.innerHTML = titletext;
605
+ title.innerHTML = jQuery.sap.encodeHTML(titletext);
627
606
  header.appendChild(title);
628
607
 
629
608
  // create the content.....................................................//
@@ -652,7 +631,6 @@ VBI.Utilities.CreateLegend = function(id, top, titletext, padding, bClickRow) {
652
631
  };
653
632
 
654
633
  VBI.Utilities.CreateGeoSceneDivCSS = function(id, classname, title) {
655
- "use strict";
656
634
  var newElement = document.createElement('div');
657
635
  newElement.id = id;
658
636
  if (classname) {
@@ -665,7 +643,6 @@ VBI.Utilities.CreateGeoSceneDivCSS = function(id, classname, title) {
665
643
  };
666
644
 
667
645
  VBI.Utilities.CreateDOMColorShiftedImageFromData = function(data, imgType, rhls1, rhls2, lcb) {
668
- "use strict";
669
646
  // the function will create an image......................................//
670
647
  // the lcb is the load callback...........................................//
671
648
  // it is required for hue shifted images..................................//
@@ -755,7 +732,6 @@ VBI.Utilities.CreateDOMColorShiftedImageFromData = function(data, imgType, rhls1
755
732
  };
756
733
 
757
734
  VBI.Utilities.CreateDOMImageFromData = function(data, imgType, lcb) {
758
- "use strict";
759
735
  // the function will create an image......................................//
760
736
  // the lcb is the load callback...........................................//
761
737
 
@@ -775,7 +751,6 @@ VBI.Utilities.CreateDOMImageFromData = function(data, imgType, lcb) {
775
751
  };
776
752
 
777
753
  VBI.Utilities.GetTransparentImage = function() {
778
- "use strict";
779
754
  // the function will create a one pixel transparent image.................//
780
755
  // the lcb is the load callback...........................................//
781
756
 
@@ -791,23 +766,19 @@ VBI.Utilities.GetTransparentImage = function() {
791
766
  // rectangle functions.......................................................//
792
767
 
793
768
  VBI.Utilities.PtOnRect = function(pt, rect) {
794
- "use strict";
795
769
  return ((pt[0] >= rect[0]) && (pt[0] <= rect[2]) && (pt[1] >= rect[1]) && (pt[1] <= rect[3])) ? true : false;
796
770
  };
797
771
 
798
772
  VBI.Utilities.PtInRect = function(pt, rect) {
799
- "use strict";
800
773
  return ((pt[0] > rect[0]) && (pt[0] < rect[2]) && (pt[1] > rect[1]) && (pt[1] < rect[3])) ? true : false;
801
774
  };
802
775
 
803
776
  VBI.Utilities.RectIntersect = function(rc1, rc2) {
804
- "use strict";
805
777
  // determine whether the two provided rectangles intersect each other.....//
806
778
  return !(rc2[0] > rc1[2] || rc2[2] < rc1[0] || rc2[3] < rc1[1] || rc2[1] > rc1[3]);
807
779
  };
808
780
 
809
781
  VBI.Utilities.RectOffset = function(rc, nX, nY) {
810
- "use strict";
811
782
  rc[0] += nX;
812
783
  rc[1] += nY;
813
784
  rc[2] += nX;
@@ -816,8 +787,6 @@ VBI.Utilities.RectOffset = function(rc, nX, nY) {
816
787
 
817
788
  VBI.Utilities.cImg;
818
789
  VBI.Utilities.GetImagePixelData = function(img) {
819
- "use strict";
820
-
821
790
  if (!VBI.Utilities.cImg) {
822
791
  VBI.Utilities.cImg = document.createElement('canvas');
823
792
  }
@@ -835,7 +804,6 @@ VBI.Utilities.GetImagePixelData = function(img) {
835
804
  };
836
805
 
837
806
  VBI.Utilities.pointOnLine = function(poly, x, y, dist, closed) {
838
- "use strict";
839
807
  // check if a point is near the line, it returns the segment that fits....//
840
808
  // when no segment fits the returned object has edge set to -1............//
841
809
  // when no node fits the returned object has node set to -1...............//
@@ -913,7 +881,6 @@ VBI.Utilities.pointOnLine = function(poly, x, y, dist, closed) {
913
881
  };
914
882
 
915
883
  VBI.Utilities.polyInPolygon = function(outerPoly, innerPoly, iO) {
916
- "use strict";
917
884
  // instance offsets are applied for innerPoly
918
885
 
919
886
  var bHit = false, bIntersect = false;
@@ -954,7 +921,6 @@ VBI.Utilities.polyInPolygon = function(outerPoly, innerPoly, iO) {
954
921
  };
955
922
 
956
923
  VBI.Utilities.pointInPolygon = function(poly, x, y) {
957
- "use strict";
958
924
  // We expect poly to have up to three dimensions [shape + exclusions][points][coords] -> multi parts to be treated separately (external)
959
925
  // We treat them recursively
960
926
  var v1, v2, len = poly.length;
@@ -998,7 +964,6 @@ VBI.Utilities.pointInPolygon = function(poly, x, y) {
998
964
  };
999
965
 
1000
966
  VBI.Utilities.pointInTriangle = function(tri, pt) {
1001
- "use strict";
1002
967
  var vx0 = tri[2][0] - tri[0][0]; // first plane spanning vector
1003
968
  var vy0 = tri[2][1] - tri[0][1];
1004
969
  var vx1 = tri[1][0] - tri[0][0]; // second plane spanning vector
@@ -1027,7 +992,6 @@ VBI.Utilities.BOTTOM = 4; // 0100
1027
992
  VBI.Utilities.TOP = 8; // 1000
1028
993
 
1029
994
  VBI.Utilities.ComputeOutCode = function(x, y, rc) {
1030
- "use strict";
1031
995
  var xmin = rc[0]; // left
1032
996
  var xmax = rc[2]; // right
1033
997
  var ymin = rc[1]; // top;
@@ -1053,7 +1017,6 @@ VBI.Utilities.ComputeOutCode = function(x, y, rc) {
1053
1017
  // if outside the rect return false
1054
1018
  // uses Cohen–Sutherland algorithm
1055
1019
  VBI.Utilities.LineIntersectRect = function(x0, y0, x1, y1, rc) {
1056
- "use strict";
1057
1020
  var oRet = {};
1058
1021
  var xmin = rc[0]; // left;
1059
1022
  var xmax = rc[2]; // right;
@@ -1115,7 +1078,6 @@ VBI.Utilities.LineIntersectRect = function(x0, y0, x1, y1, rc) {
1115
1078
  };
1116
1079
 
1117
1080
  VBI.Utilities.LineLineIntersection = function(p1, p2, q1, q2, bSegmentOnly) {
1118
- "use strict";
1119
1081
  var A1 = p2[1] - p1[1];
1120
1082
  var B1 = p1[0] - p2[0];
1121
1083
  var C1 = A1 * p1[0] + B1 * p1[1];
@@ -1163,7 +1125,6 @@ VBI.Utilities.LineLineIntersection = function(p1, p2, q1, q2, bSegmentOnly) {
1163
1125
  };
1164
1126
 
1165
1127
  VBI.Utilities.IsClockwise = function(pointlist) {
1166
- "use strict";
1167
1128
  var length = pointlist.length;
1168
1129
  if (pointlist.length % 2) {
1169
1130
  length -= 1;
@@ -1184,8 +1145,6 @@ VBI.Utilities.IsClockwise = function(pointlist) {
1184
1145
 
1185
1146
  // GetClippedPolygon gives precise result only for convex polygons
1186
1147
  VBI.Utilities.GetClippedPolygon = function(pointarray, Xoffset, rcviewport) {
1187
- "use strict";
1188
-
1189
1148
  var offset = Xoffset;
1190
1149
  var outputlist = pointarray.slice(0);
1191
1150
  var inputlist = [];
@@ -1282,7 +1241,6 @@ VBI.Utilities.GetClippedPolygon = function(pointarray, Xoffset, rcviewport) {
1282
1241
  };
1283
1242
 
1284
1243
  VBI.Utilities.GetBarycenterForPolygon = function(pointarray, offset) {
1285
- "use strict";
1286
1244
  var pa = pointarray.slice(0);
1287
1245
  var pt1 = [
1288
1246
  pa[0], pa[1]
@@ -1329,7 +1287,6 @@ VBI.Utilities.GetBarycenterForPolygon = function(pointarray, offset) {
1329
1287
  };
1330
1288
 
1331
1289
  VBI.Utilities.GetMidpointForPolygon = function(pointarray, bb, Xoffset, rcviewport) {
1332
- "use strict";
1333
1290
  var offset = Xoffset;
1334
1291
  var labelPositions = [];
1335
1292
  var lt = bb[0];
@@ -1360,8 +1317,6 @@ VBI.Utilities.GetMidpointForPolygon = function(pointarray, bb, Xoffset, rcviewpo
1360
1317
  };
1361
1318
 
1362
1319
  VBI.Utilities.GetClippedPolygons = function(pointarray, offset, rcviewport) {
1363
- "use strict";
1364
-
1365
1320
  var outputlist = [];
1366
1321
  var pointlist = pointarray.slice(0);
1367
1322
  var nStartViewportList = pointlist.length;
@@ -1517,17 +1472,14 @@ VBI.Utilities.GetClippedPolygons = function(pointarray, offset, rcviewport) {
1517
1472
  };
1518
1473
 
1519
1474
  VBI.Utilities.StandardSort1 = function(a, b) {
1520
- "use strict";
1521
1475
  return a.pt - b.pt;
1522
1476
  };
1523
1477
 
1524
1478
  VBI.Utilities.StandardSort2 = function(a, b) {
1525
- "use strict";
1526
1479
  return b.pt - a.pt;
1527
1480
  };
1528
1481
 
1529
1482
  VBI.Utilities.GetMidpointsForPolygon = function(pointarray, bb, Xoffset, rcviewport) {
1530
- "use strict";
1531
1483
  var polylist = [];
1532
1484
  var offset = Xoffset;
1533
1485
  var labelPositions = [];
@@ -1580,7 +1532,6 @@ VBI.Utilities.GetMidpointsForPolygon = function(pointarray, bb, Xoffset, rcviewp
1580
1532
  };
1581
1533
 
1582
1534
  VBI.Utilities.GetMidpointsForLine = function(pointarray, offset, rcviewport) {
1583
- "use strict";
1584
1535
  var labelPositions = [];
1585
1536
  var bRet = {};
1586
1537
  var ptLastEnd = [
@@ -1691,7 +1642,6 @@ VBI.Utilities.GetMidpointsForLine = function(pointarray, offset, rcviewport) {
1691
1642
  };
1692
1643
 
1693
1644
  VBI.Utilities.updateBoundRect = function(oArray, rect) {
1694
- "use strict";
1695
1645
  // update bounding box....................................................//
1696
1646
  // using the new array of coords and calculating new values...............//
1697
1647
 
@@ -1724,7 +1674,6 @@ VBI.Utilities.updateBoundRect = function(oArray, rect) {
1724
1674
  };
1725
1675
 
1726
1676
  VBI.Utilities.inflateRect = function(rect, val) {
1727
- "use strict";
1728
1677
  // inflate the rectangle..................................................//
1729
1678
  rect[0] -= val;
1730
1679
  rect[1] -= val;
@@ -1737,7 +1686,6 @@ VBI.Utilities.inflateRect = function(rect, val) {
1737
1686
  // x3, y3 is the point to be measuresd.......................................//
1738
1687
 
1739
1688
  VBI.Utilities.sqDistance = function(x1, y1, x2, y2, x3, y3) {
1740
- "use strict";
1741
1689
  // vector between points..................................................//
1742
1690
  var px = x2 - x1;
1743
1691
  var py = y2 - y1;
@@ -1767,7 +1715,6 @@ VBI.Utilities.sqDistance = function(x1, y1, x2, y2, x3, y3) {
1767
1715
  // x, y is the point to be measured .........................................//
1768
1716
 
1769
1717
  VBI.Utilities.getNextPoint = function(x, y, poly, offset) {
1770
- "use strict";
1771
1718
  var v1, v2, len = poly.length;
1772
1719
  var pts = [];
1773
1720
  var distances = [];
@@ -1853,7 +1800,6 @@ VBI.Utilities.getNextPoint = function(x, y, poly, offset) {
1853
1800
  // drawing methods...........................................................//
1854
1801
 
1855
1802
  VBI.Utilities.DrawSelectIndicator = function(ctx, p) {
1856
- "use strict";
1857
1803
  var r = 4;
1858
1804
 
1859
1805
  // fill corner arcs....................................................//
@@ -1868,7 +1814,6 @@ VBI.Utilities.DrawSelectIndicator = function(ctx, p) {
1868
1814
  };
1869
1815
 
1870
1816
  VBI.Utilities.DrawDesignRect = function(ctx, handles, p1, p2, p3, p4) {
1871
- "use strict";
1872
1817
  // handles is an array of values tat specify the visibility of the drag...//
1873
1818
  // box handles............................................................//
1874
1819
  var x, y, r = 3, bDash = ctx.setLineDash ? true : false;
@@ -1929,8 +1874,6 @@ VBI.Utilities.DrawDesignRect = function(ctx, handles, p1, p2, p3, p4) {
1929
1874
  };
1930
1875
 
1931
1876
  VBI.Utilities.DrawFrameRect = function(ctx, col, p1, p2, p3, p4) {
1932
- "use strict";
1933
-
1934
1877
  ctx.lineWidth = 1;
1935
1878
  ctx.strokeStyle = col;
1936
1879
 
@@ -1944,8 +1887,6 @@ VBI.Utilities.DrawFrameRect = function(ctx, col, p1, p2, p3, p4) {
1944
1887
  };
1945
1888
 
1946
1889
  VBI.Utilities.AssembleCopyrightString = function(Copyright, CopyrightLink, CopyrightImage) {
1947
- "use strict";
1948
-
1949
1890
  var regex1 = /\{LINK\|IMG\}/;
1950
1891
  var regex2 = /\{IMG\}/;
1951
1892
  var regex3 = /\{LINK\|([^\}]+)\}/;
@@ -1959,8 +1900,6 @@ VBI.Utilities.AssembleCopyrightString = function(Copyright, CopyrightLink, Copyr
1959
1900
  };
1960
1901
 
1961
1902
  VBI.Utilities.DrawTrackingRect = function(ctx, p1, p2, p3, p4) {
1962
- "use strict";
1963
-
1964
1903
  ctx.save();
1965
1904
  ctx.strokeStyle = 'black';
1966
1905
  ctx.lineWidth = 1;
@@ -1978,8 +1917,6 @@ VBI.Utilities.DrawTrackingRect = function(ctx, p1, p2, p3, p4) {
1978
1917
  };
1979
1918
 
1980
1919
  VBI.Utilities.DrawTrackingLasso = function(ctx, aPos) {
1981
- "use strict";
1982
-
1983
1920
  ctx.save();
1984
1921
  ctx.strokeStyle = 'black';
1985
1922
  ctx.lineWidth = 1;
@@ -2004,8 +1941,6 @@ VBI.Utilities.DrawTrackingLasso = function(ctx, aPos) {
2004
1941
  // color conversion routines.................................................//
2005
1942
 
2006
1943
  VBI.Utilities.RGB2HLS = function(red, green, blue) {
2007
- "use strict";
2008
-
2009
1944
  red /= 255.0;
2010
1945
  green /= 255.0;
2011
1946
  blue /= 255.0; // normalize to [0,1]
@@ -2038,7 +1973,6 @@ VBI.Utilities.RGB2HLS = function(red, green, blue) {
2038
1973
  };
2039
1974
 
2040
1975
  VBI.Utilities.HLS2RGB = function(hue, lum, sat) {
2041
- "use strict";
2042
1976
  var red = 0, green = 0, blue = 0;
2043
1977
  if (sat == 0) {
2044
1978
  red = green = blue = lum;
@@ -2056,7 +1990,6 @@ VBI.Utilities.HLS2RGB = function(hue, lum, sat) {
2056
1990
  };
2057
1991
 
2058
1992
  VBI.Utilities.HUE2RGB = function(p, q, t) {
2059
- "use strict";
2060
1993
  if (t < 0) {
2061
1994
  t += 1;
2062
1995
  } else if (t > 1) {
@@ -2077,7 +2010,6 @@ VBI.Utilities.HUE2RGB = function(p, q, t) {
2077
2010
 
2078
2011
  // get the pixel value of 1rem
2079
2012
  VBI.Utilities.RemToPixel = function(value) {
2080
- "use strict";
2081
2013
  // Returns a number
2082
2014
  return value * parseFloat(
2083
2015
  // of the computed font-size, so in px
@@ -2087,13 +2019,11 @@ VBI.Utilities.RemToPixel = function(value) {
2087
2019
  };
2088
2020
 
2089
2021
  VBI.Utilities.ColorHex2rgba = function(sHC) {
2090
- "use strict";
2091
2022
  var sColor = sHC.charAt(0) === "#" ? sHC.substring(1, 7) : sHC;
2092
2023
  return 'rgba(' + parseInt(sColor.substring(0, 2), 16) + ',' + parseInt(sColor.substring(2, 4), 16) + ',' + parseInt(sColor.substring(4, 6), 16) + ',1.0)';
2093
2024
  };
2094
2025
 
2095
2026
  VBI.Utilities.String2VBColor = function(s) {
2096
- "use strict";
2097
2027
  var aCol = VBI.Types.string2rgba(s);
2098
2028
  if (aCol[4] === 1) {
2099
2029
  return "RGBA(" + aCol[0] + ";" + aCol[1] + ";" + aCol[2] + ";" + parseInt(aCol[3] * 255, 10) + ")";
@@ -2103,14 +2033,12 @@ VBI.Utilities.String2VBColor = function(s) {
2103
2033
  };
2104
2034
 
2105
2035
  VBI.Utilities.CompToHex = function(c) {
2106
- "use strict";
2107
-
2108
2036
  var hex = c.toString(16);
2109
2037
  return hex.length == 1 ? "0" + hex : hex;
2110
2038
  };
2111
2039
 
2112
2040
  VBI.Utilities.RgbToHex = function(r, g, b) {
2113
- "use strict";
2114
-
2115
2041
  return "#" + VBI.Utilities.CompToHex(r) + VBI.Utilities.CompToHex(g) + VBI.Utilities.CompToHex(b);
2116
2042
  };
2043
+
2044
+ });
@@ -1,11 +1,17 @@
1
- // ...........................................................................//
2
- // this module defines the clustering ...................................//
1
+ /*
2
+ * ! SAPUI5
3
+ * (c) Copyright 2009-2022 SAP SE. All rights reserved.
4
+ */
3
5
 
6
+ // this module defines the clustering
4
7
  // Author: Jürgen Gatter for Grid based Clustering,
5
8
  // Dimitar Vangelovski for Distance based Clustering
6
9
 
7
- VBI.Clustering = function(target) {
10
+ sap.ui.define(["./sapvbi"]
11
+ , function() {
8
12
  "use strict";
13
+
14
+ VBI.Clustering = function(target) {
9
15
  /* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
10
16
  var clustering = {};
11
17
  var Delaunay = {};
@@ -415,7 +421,7 @@ VBI.Clustering = function(target) {
415
421
  case 2:
416
422
  b2BeRemoved = bGeneralRemove;
417
423
  break;
418
- default:
424
+ default:
419
425
  break;
420
426
  }
421
427
  if (b2BeRemoved) {
@@ -1976,7 +1982,7 @@ VBI.Clustering = function(target) {
1976
1982
  // for (var j=0; j< aNode2.length;++j)
1977
1983
  // cluster.CheckConsistency(aNode2[j], log2ComplX, distThreshold);
1978
1984
  // };
1979
- //
1985
+ //
1980
1986
  // cluster.CheckConsistency = function ( node, log2ComplX, distThreshold )
1981
1987
  // {
1982
1988
  // if ((node == -1)||(node.bw==undefined)||(node.bInvalid)||!node.bCluster) return;
@@ -1986,7 +1992,7 @@ VBI.Clustering = function(target) {
1986
1992
  // cnt += node.bw[i].cnt;
1987
1993
  // if (node.cnt != cnt)
1988
1994
  // VBI.Trace("Count Inconsistency found ");
1989
- //
1995
+ //
1990
1996
  // var bo = node.bo;
1991
1997
  // if (bo == undefined ){
1992
1998
  // VBI.Trace("bo undefined issue");
@@ -2405,3 +2411,5 @@ VBI.Clustering = function(target) {
2405
2411
 
2406
2412
  return clustering;
2407
2413
  };
2414
+
2415
+ });