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