@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.
- package/package.json +1 -1
- package/src/sap/ui/vbm/.library +1 -1
- package/src/sap/ui/vbm/Adapter.js +46 -9
- package/src/sap/ui/vbm/Adapter3D.js +2 -3
- package/src/sap/ui/vbm/AnalyticMap.js +1 -2
- package/src/sap/ui/vbm/AnalyticMapRenderer.js +1 -2
- package/src/sap/ui/vbm/Area.js +1 -2
- package/src/sap/ui/vbm/Areas.js +8 -10
- package/src/sap/ui/vbm/Box.js +1 -2
- package/src/sap/ui/vbm/Boxes.js +1 -2
- package/src/sap/ui/vbm/Circle.js +1 -2
- package/src/sap/ui/vbm/Circles.js +1 -2
- package/src/sap/ui/vbm/Cluster.js +5 -5
- package/src/sap/ui/vbm/ClusterBase.js +5 -9
- package/src/sap/ui/vbm/ClusterContainer.js +1 -2
- package/src/sap/ui/vbm/ClusterDistance.js +1 -2
- package/src/sap/ui/vbm/ClusterGrid.js +1 -2
- package/src/sap/ui/vbm/ClusterRenderer.js +1 -3
- package/src/sap/ui/vbm/ClusterTree.js +1 -2
- package/src/sap/ui/vbm/Container.js +1 -2
- package/src/sap/ui/vbm/Containers.js +4 -7
- package/src/sap/ui/vbm/DragSource.js +1 -2
- package/src/sap/ui/vbm/DropTarget.js +1 -2
- package/src/sap/ui/vbm/Feature.js +1 -2
- package/src/sap/ui/vbm/FeatureCollection.js +1 -2
- package/src/sap/ui/vbm/GeoCircle.js +1 -2
- package/src/sap/ui/vbm/GeoCircles.js +1 -2
- package/src/sap/ui/vbm/GeoJsonLayer.js +10 -12
- package/src/sap/ui/vbm/GeoMap.js +19 -9
- package/src/sap/ui/vbm/GeoMapRenderer.js +1 -2
- package/src/sap/ui/vbm/HeatPoint.js +1 -2
- package/src/sap/ui/vbm/Heatmap.js +1 -2
- package/src/sap/ui/vbm/Legend.js +1 -2
- package/src/sap/ui/vbm/LegendItem.js +1 -2
- package/src/sap/ui/vbm/Pie.js +1 -2
- package/src/sap/ui/vbm/PieItem.js +1 -2
- package/src/sap/ui/vbm/Pies.js +1 -2
- package/src/sap/ui/vbm/Region.js +1 -2
- package/src/sap/ui/vbm/Resource.js +1 -2
- package/src/sap/ui/vbm/Route.js +1 -2
- package/src/sap/ui/vbm/Routes.js +1 -2
- package/src/sap/ui/vbm/Spot.js +1 -2
- package/src/sap/ui/vbm/Spots.js +1 -2
- package/src/sap/ui/vbm/VBI.js +41 -10
- package/src/sap/ui/vbm/VBIRenderer.js +1 -2
- package/src/sap/ui/vbm/Viewport.js +2 -3
- package/src/sap/ui/vbm/ViewportRenderer.js +1 -2
- package/src/sap/ui/vbm/VoAbstract.js +1 -2
- package/src/sap/ui/vbm/VoAggregation.js +4 -7
- package/src/sap/ui/vbm/VoBase.js +1 -2
- package/src/sap/ui/vbm/adapter3d/ModelHandler.js +2 -3
- package/src/sap/ui/vbm/adapter3d/ObjectFactory.js +2 -3
- package/src/sap/ui/vbm/adapter3d/PolygonHandler.js +2 -3
- package/src/sap/ui/vbm/adapter3d/SceneBuilder.js +4 -3
- package/src/sap/ui/vbm/adapter3d/Utilities.js +1 -2
- package/src/sap/ui/vbm/adapter3d/VBIJSONParser.js +2 -3
- package/src/sap/ui/vbm/lib/sapactions.js +11 -9
- package/src/sap/ui/vbm/lib/sapautomations.js +11 -13
- package/src/sap/ui/vbm/lib/sapconfig.js +10 -3
- package/src/sap/ui/vbm/lib/sapdataprovider.js +10 -21
- package/src/sap/ui/vbm/lib/sapevents.js +10 -11
- package/src/sap/ui/vbm/lib/sapgeolocation.js +9 -3
- package/src/sap/ui/vbm/lib/sapgeomath.js +10 -4
- package/src/sap/ui/vbm/lib/sapgeotool.js +11 -3
- package/src/sap/ui/vbm/lib/sapheatmap.js +27 -25
- package/src/sap/ui/vbm/lib/saplabels.js +16 -11
- package/src/sap/ui/vbm/lib/saplassotrack.js +10 -5
- package/src/sap/ui/vbm/lib/sapmaplayer.js +12 -10
- package/src/sap/ui/vbm/lib/sapmapmanager.js +14 -5
- package/src/sap/ui/vbm/lib/sapmapprovider.js +10 -5
- package/src/sap/ui/vbm/lib/sapnavigation.js +10 -3
- package/src/sap/ui/vbm/lib/sapparsing.js +10 -1
- package/src/sap/ui/vbm/lib/sappositioning.js +11 -5
- package/src/sap/ui/vbm/lib/sapprojection.js +11 -5
- package/src/sap/ui/vbm/lib/saprecttrack.js +10 -5
- package/src/sap/ui/vbm/lib/sapresources.js +11 -6
- package/src/sap/ui/vbm/lib/sapscale.js +14 -5
- package/src/sap/ui/vbm/lib/sapscene.js +14 -13
- package/src/sap/ui/vbm/lib/saputilities.js +18 -91
- package/src/sap/ui/vbm/lib/sapvbcluster.js +13 -6
- package/src/sap/ui/vbm/lib/sapvbi.js +10 -42
- package/src/sap/ui/vbm/lib/sapvbicontext.js +10 -5
- package/src/sap/ui/vbm/lib/sapvbmenu.js +18 -13
- package/src/sap/ui/vbm/lib/sapvobase.js +16 -16
- package/src/sap/ui/vbm/lib/sapvoutils.js +13 -24
- package/src/sap/ui/vbm/lib/sapwindow.js +11 -12
- package/src/sap/ui/vbm/library.js +29 -33
- package/src/sap/ui/vbm/themes/base/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_belize/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_belize_hcb/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_belize_hcw/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_belize_plus/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_bluecrystal/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_fiori_3/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_fiori_3_dark/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_fiori_3_hcb/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_fiori_3_hcw/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_hcb/library.source.less +1 -2
- package/src/sap/ui/vbm/themes/sap_horizon/library.source.less +7 -0
- package/ui5.yaml +7 -4
- package/src/sap/ui/vbm/themes/sap_mvi/empty.less +0 -0
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ! SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved
|
|
3
|
+
*/
|
|
3
4
|
|
|
5
|
+
// DataProvider and DataType namespace
|
|
4
6
|
// Author: Ulrich Roegelein
|
|
5
7
|
|
|
8
|
+
sap.ui.define(["./sapvbi"]
|
|
9
|
+
, function() {
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
6
12
|
// ...........................................................................//
|
|
7
13
|
// helper functions..........................................................//
|
|
8
14
|
VBI.isInt = function(input) {
|
|
9
|
-
"use strict";
|
|
10
15
|
/* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
|
|
11
16
|
return ((input - 0) == input && input % 1 == 0);
|
|
12
17
|
};
|
|
13
18
|
|
|
14
19
|
VBI.IndexOf = function(array, ele) {
|
|
15
|
-
"use strict";
|
|
16
20
|
// to not use indexof in an array, we do this function here...............//
|
|
17
21
|
var len = array.length;
|
|
18
22
|
for (var nJ = 0; nJ < len; ++nJ) {
|
|
@@ -42,7 +46,6 @@ VBI.Types = {
|
|
|
42
46
|
// from string conversions................................................//
|
|
43
47
|
|
|
44
48
|
string2bool: function(a) {
|
|
45
|
-
"use strict";
|
|
46
49
|
if (typeof a == "boolean") {
|
|
47
50
|
return a;
|
|
48
51
|
}
|
|
@@ -55,7 +58,6 @@ VBI.Types = {
|
|
|
55
58
|
},
|
|
56
59
|
|
|
57
60
|
string2vector: function(a) {
|
|
58
|
-
"use strict";
|
|
59
61
|
var error = false;
|
|
60
62
|
var array = a.split(';');
|
|
61
63
|
for (var nJ = 0, len = array.length; nJ < len; ++nJ) {
|
|
@@ -69,7 +71,6 @@ VBI.Types = {
|
|
|
69
71
|
},
|
|
70
72
|
|
|
71
73
|
stringarray2vectorarray: function(a) {
|
|
72
|
-
"use strict";
|
|
73
74
|
var result = [];
|
|
74
75
|
// we expect an array of string arrays
|
|
75
76
|
for (var nI = 0, len = a.length; nI < len; ++nI) {
|
|
@@ -83,7 +84,6 @@ VBI.Types = {
|
|
|
83
84
|
},
|
|
84
85
|
|
|
85
86
|
string2rgba: function(a) {
|
|
86
|
-
"use strict";
|
|
87
87
|
// return an rgba array [r,g,b,a,x] plus a 5ths component that defines that an alpha was set
|
|
88
88
|
var cache, rgb;
|
|
89
89
|
// CSS color formats
|
|
@@ -176,13 +176,11 @@ VBI.Types = {
|
|
|
176
176
|
},
|
|
177
177
|
|
|
178
178
|
string2color: function(a) {
|
|
179
|
-
"use strict";
|
|
180
179
|
var rgba = this.string2rgba(a);
|
|
181
180
|
return "rgba(" + rgba[0] + "," + rgba[1] + "," + rgba[2] + "," + rgba[3] + ")";
|
|
182
181
|
},
|
|
183
182
|
|
|
184
183
|
string2rhls: function(a) {
|
|
185
|
-
"use strict";
|
|
186
184
|
// input: RHLS(270;0.6;0.8)
|
|
187
185
|
// input: RHLSA(270;0.6;0.8;0.5)
|
|
188
186
|
|
|
@@ -207,7 +205,6 @@ VBI.Types = {
|
|
|
207
205
|
},
|
|
208
206
|
|
|
209
207
|
color2array: function(a) {
|
|
210
|
-
"use strict";
|
|
211
208
|
// input rgba(128,128,128,1.0)
|
|
212
209
|
// output [0.5,0.5,0.5,1.0] // red, green, blue, alpha
|
|
213
210
|
|
|
@@ -222,7 +219,6 @@ VBI.Types = {
|
|
|
222
219
|
},
|
|
223
220
|
|
|
224
221
|
string2long: function(a) {
|
|
225
|
-
"use strict";
|
|
226
222
|
if (typeof a == "boolean") {
|
|
227
223
|
return a ? 1 : 0;
|
|
228
224
|
}
|
|
@@ -230,7 +226,6 @@ VBI.Types = {
|
|
|
230
226
|
},
|
|
231
227
|
|
|
232
228
|
string2float: function(a) {
|
|
233
|
-
"use strict";
|
|
234
229
|
if (typeof a == "boolean") {
|
|
235
230
|
return a ? 1.0 : 0.0;
|
|
236
231
|
}
|
|
@@ -241,12 +236,10 @@ VBI.Types = {
|
|
|
241
236
|
// to string conversions..................................................//
|
|
242
237
|
|
|
243
238
|
float2string: function(a) {
|
|
244
|
-
"use strict";
|
|
245
239
|
return a.toString();
|
|
246
240
|
},
|
|
247
241
|
|
|
248
242
|
vector2string: function(a) {
|
|
249
|
-
"use strict";
|
|
250
243
|
// merge to a semicolon separated string...............................//
|
|
251
244
|
var tmp = "";
|
|
252
245
|
for (var nJ = 0; nJ < a.length; ++nJ) {
|
|
@@ -259,7 +252,6 @@ VBI.Types = {
|
|
|
259
252
|
},
|
|
260
253
|
|
|
261
254
|
color2string: function(a) {
|
|
262
|
-
"use strict";
|
|
263
255
|
var res;
|
|
264
256
|
if ((res = /^rgba\(([\d]+),([\d]+),([\d]+),([\d]+|[\d]*.[\d]+)\)/.exec(a))) {
|
|
265
257
|
res = [
|
|
@@ -271,12 +263,10 @@ VBI.Types = {
|
|
|
271
263
|
},
|
|
272
264
|
|
|
273
265
|
long2float: function(a) {
|
|
274
|
-
"use strict";
|
|
275
266
|
return parseFloat(a, 10);
|
|
276
267
|
},
|
|
277
268
|
|
|
278
269
|
float2long: function(a) {
|
|
279
|
-
"use strict";
|
|
280
270
|
return parseInt(a, 10);
|
|
281
271
|
}
|
|
282
272
|
};
|
|
@@ -286,7 +276,6 @@ VBI.Types = {
|
|
|
286
276
|
// ...........................................................................//
|
|
287
277
|
|
|
288
278
|
VBI.DataTypeProvider = function() {
|
|
289
|
-
"use strict";
|
|
290
279
|
var datatypeprovider = {};
|
|
291
280
|
datatypeprovider.m_datatypenodes = [];
|
|
292
281
|
datatypeprovider.vbiclass = "DataTypeProvider";
|
|
@@ -713,7 +702,6 @@ VBI.DataTypeProvider = function() {
|
|
|
713
702
|
// ...........................................................................//
|
|
714
703
|
|
|
715
704
|
VBI.DataProvider = function() {
|
|
716
|
-
"use strict";
|
|
717
705
|
var dataprovider = {};
|
|
718
706
|
|
|
719
707
|
// node, element, attribute
|
|
@@ -1879,7 +1867,6 @@ VBI.DataProvider = function() {
|
|
|
1879
1867
|
// data adaptors.............................................................//
|
|
1880
1868
|
|
|
1881
1869
|
VBI.Adaptor = function(ctx) {
|
|
1882
|
-
"use strict";
|
|
1883
1870
|
var Ctx = ctx; // current session context................................//
|
|
1884
1871
|
|
|
1885
1872
|
this.RecursiveLoadElement = function(de, odn, dtn) {
|
|
@@ -1997,3 +1984,5 @@ VBI.Adaptor = function(ctx) {
|
|
|
1997
1984
|
return vbiDat;
|
|
1998
1985
|
};
|
|
1999
1986
|
};
|
|
1987
|
+
|
|
1988
|
+
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ! SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved
|
|
3
|
+
*/
|
|
3
4
|
|
|
5
|
+
// this module does the events implementation on a scene
|
|
4
6
|
// Author: Ulrich Roegelein
|
|
5
|
-
|
|
6
|
-
// ...........................................................................//
|
|
7
7
|
// vb sap events:
|
|
8
|
-
|
|
9
8
|
// sapdown // touchstart, mousedown,
|
|
10
9
|
// sapmove // mousemove
|
|
11
10
|
// sapleave // mouseleave
|
|
@@ -13,15 +12,16 @@
|
|
|
13
12
|
// sapclick
|
|
14
13
|
// sapdblclick // double mouse click
|
|
15
14
|
// sapsecclick // contextmenu rightclick taphold
|
|
16
|
-
|
|
17
15
|
// // sapzoom
|
|
18
16
|
// // saprotate
|
|
19
17
|
|
|
18
|
+
sap.ui.define(["./sapvbi"]
|
|
19
|
+
, function() {
|
|
20
|
+
"use strict";
|
|
21
|
+
|
|
20
22
|
// ...........................................................................//
|
|
21
23
|
// pointer events............................................................//
|
|
22
|
-
|
|
23
24
|
VBI.ScenePointerEvents = function(scene, ele) {
|
|
24
|
-
"use strict";
|
|
25
25
|
/* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
|
|
26
26
|
// gesture support........................................................//
|
|
27
27
|
scene.m_Gesture = null; // we move the gesture to the scene as state...//
|
|
@@ -234,7 +234,6 @@ VBI.ScenePointerEvents = function(scene, ele) {
|
|
|
234
234
|
// ...........................................................................//
|
|
235
235
|
// touch events..............................................................//
|
|
236
236
|
VBI.SceneTouchEvents = function(scene, ele) {
|
|
237
|
-
"use strict";
|
|
238
237
|
var isNavigationDisabled = scene.m_SuppressedNavigation.move && scene.m_SuppressedNavigation.zoom;
|
|
239
238
|
|
|
240
239
|
this.m_Events = [
|
|
@@ -724,7 +723,6 @@ VBI.SceneTouchEvents = function(scene, ele) {
|
|
|
724
723
|
// ...........................................................................//
|
|
725
724
|
// scene events .............................................................//
|
|
726
725
|
VBI.SceneEvent = function(scene, ele) {
|
|
727
|
-
"use strict";
|
|
728
726
|
// device specific additional handlers....................................//
|
|
729
727
|
this.m_DeviceHandlers = [];
|
|
730
728
|
VBI.m_bMouseSupported = false;
|
|
@@ -1840,7 +1838,6 @@ VBI.SceneEvent = function(scene, ele) {
|
|
|
1840
1838
|
};
|
|
1841
1839
|
|
|
1842
1840
|
VBI.ThumbnailEvent = function(scene, ele) {
|
|
1843
|
-
"use strict";
|
|
1844
1841
|
// device specific additional handlers....................................//
|
|
1845
1842
|
this.m_DeviceHandlers = [];
|
|
1846
1843
|
|
|
@@ -2041,3 +2038,5 @@ VBI.ThumbnailEvent = function(scene, ele) {
|
|
|
2041
2038
|
|
|
2042
2039
|
this.subscribe();
|
|
2043
2040
|
};
|
|
2041
|
+
|
|
2042
|
+
});
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ! SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved
|
|
3
|
+
*/
|
|
3
4
|
|
|
4
5
|
// Author: Ulrich Roegelein
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
sap.ui.define(["./sapvbi"]
|
|
8
|
+
, function() {
|
|
7
9
|
"use strict";
|
|
10
|
+
|
|
11
|
+
VBI.GeoLocation = function() {
|
|
8
12
|
/* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
|
|
9
13
|
var geolocation = {};
|
|
10
14
|
geolocation.vbiclass = "GeoLocation";
|
|
@@ -83,3 +87,5 @@ VBI.GeoLocation = function() {
|
|
|
83
87
|
|
|
84
88
|
return geolocation;
|
|
85
89
|
};
|
|
90
|
+
|
|
91
|
+
});
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ! SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved
|
|
3
|
+
*/
|
|
3
4
|
|
|
5
|
+
// math library for geo
|
|
4
6
|
// Author: Ulrich Roegelein
|
|
7
|
+
// !remark!, all arguments work with radians
|
|
5
8
|
|
|
6
|
-
|
|
9
|
+
sap.ui.define(["./sapvbi"]
|
|
10
|
+
, function() {
|
|
11
|
+
"use strict";
|
|
7
12
|
|
|
8
13
|
VBI.MathLib = (function() {
|
|
9
|
-
"use strict";
|
|
10
14
|
/* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
|
|
11
15
|
var mathlib = {};
|
|
12
16
|
|
|
@@ -330,3 +334,5 @@ VBI.MathLib = (function() {
|
|
|
330
334
|
|
|
331
335
|
return mathlib;
|
|
332
336
|
})();
|
|
337
|
+
|
|
338
|
+
});
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ! SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved
|
|
3
|
+
*/
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
// tools extensions for VBI namespace
|
|
6
|
+
|
|
7
|
+
sap.ui.define(["./sapvbi"]
|
|
8
|
+
, function() {
|
|
5
9
|
"use strict";
|
|
10
|
+
|
|
11
|
+
VBI.QuadTree = function(maxQuadItems, maxLOD, rect) {
|
|
6
12
|
/* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
|
|
7
13
|
// quadrants
|
|
8
14
|
// ---------
|
|
@@ -220,3 +226,5 @@ VBI.QuadTree = function(maxQuadItems, maxLOD, rect) {
|
|
|
220
226
|
})()
|
|
221
227
|
};
|
|
222
228
|
};
|
|
229
|
+
|
|
230
|
+
});
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
sap.ui.define(["./sapvbi"]
|
|
6
|
+
, function() {
|
|
7
|
+
"use strict";
|
|
8
|
+
|
|
1
9
|
// init creatable objects in vbi context
|
|
2
10
|
/* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
|
|
3
11
|
VBI.Tex = null; // texture object
|
|
@@ -12,7 +20,6 @@ VBI.Hm = null; // heatmap object
|
|
|
12
20
|
// hook into webgl...........................................................//
|
|
13
21
|
|
|
14
22
|
VBI.Hook = (function() {
|
|
15
|
-
"use strict";
|
|
16
23
|
// override getExtension for different vendors............................//
|
|
17
24
|
if (window.WebGLRenderingContext) {
|
|
18
25
|
// hook get the rendercontect getExtension.............................//
|
|
@@ -38,16 +45,15 @@ VBI.Hook = (function() {
|
|
|
38
45
|
// add helper function.................................................//
|
|
39
46
|
WebGLRenderingContext.prototype.getExtensions = function(spec) {
|
|
40
47
|
// try to get needed extensions
|
|
41
|
-
return this.getExtension('OES_texture_float');
|
|
48
|
+
return this.getExtension('OES_texture_float');
|
|
42
49
|
|
|
43
50
|
// 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');
|
|
51
|
+
// this.getExtension('WEBGL_color_buffer_float');
|
|
45
52
|
};
|
|
46
53
|
}
|
|
47
54
|
})();
|
|
48
55
|
|
|
49
56
|
VBI.Shader = (function() {
|
|
50
|
-
"use strict";
|
|
51
57
|
function Shader(gl, vs, fs) {
|
|
52
58
|
this.m_GL = gl; // store gl object
|
|
53
59
|
this.m_UL = {}; // variable locations in program
|
|
@@ -107,7 +113,6 @@ VBI.Shader = (function() {
|
|
|
107
113
|
})();
|
|
108
114
|
|
|
109
115
|
VBI.FB = (function() {
|
|
110
|
-
"use strict";
|
|
111
116
|
function FB(gl) {
|
|
112
117
|
this.m_GL = gl;
|
|
113
118
|
this.m_FB = this.m_GL.createFramebuffer();
|
|
@@ -135,7 +140,7 @@ VBI.FB = (function() {
|
|
|
135
140
|
if (status !== this.m_GL.FRAMEBUFFER_COMPLETE) {
|
|
136
141
|
return null;
|
|
137
142
|
}
|
|
138
|
-
|
|
143
|
+
|
|
139
144
|
return this;
|
|
140
145
|
};
|
|
141
146
|
|
|
@@ -143,7 +148,6 @@ VBI.FB = (function() {
|
|
|
143
148
|
})();
|
|
144
149
|
|
|
145
150
|
VBI.Tex = (function() {
|
|
146
|
-
"use strict";
|
|
147
151
|
function Tex(gl, params) {
|
|
148
152
|
var tmp;
|
|
149
153
|
this.m_GL = gl;
|
|
@@ -203,7 +207,6 @@ VBI.Tex = (function() {
|
|
|
203
207
|
})();
|
|
204
208
|
|
|
205
209
|
VBI.Ro = (function() {
|
|
206
|
-
"use strict";
|
|
207
210
|
function Ro(gl, width, height) {
|
|
208
211
|
this.m_GL = gl;
|
|
209
212
|
this.m_W = width;
|
|
@@ -219,7 +222,7 @@ VBI.Ro = (function() {
|
|
|
219
222
|
this.m_Tex = new VBI.Tex(this.m_GL, {
|
|
220
223
|
type: texType
|
|
221
224
|
});
|
|
222
|
-
|
|
225
|
+
|
|
223
226
|
this.m_Tex.BindTex(0);
|
|
224
227
|
this.m_Tex.AdjustSize(width, height);
|
|
225
228
|
this.m_Tex.SetFilterNearest();
|
|
@@ -232,15 +235,15 @@ VBI.Ro = (function() {
|
|
|
232
235
|
// check if render to float texture is supported
|
|
233
236
|
if (!this.m_FB.SetTex(this.m_Tex)) {
|
|
234
237
|
this.m_FB.UnBindFB();
|
|
235
|
-
|
|
238
|
+
|
|
236
239
|
// render to float texture not supported => try to create integer texture and then render to it
|
|
237
240
|
//jQuery.sap.log.error("Render to float texture not supported => creating integer texture");
|
|
238
|
-
|
|
241
|
+
|
|
239
242
|
// create an integer texture
|
|
240
243
|
this.m_Tex = new VBI.Tex(this.m_GL, {
|
|
241
244
|
type: null
|
|
242
245
|
});
|
|
243
|
-
|
|
246
|
+
|
|
244
247
|
this.m_Tex.BindTex(0);
|
|
245
248
|
this.m_Tex.AdjustSize(width, height);
|
|
246
249
|
this.m_Tex.SetFilterNearest();
|
|
@@ -281,7 +284,6 @@ VBI.Ro = (function() {
|
|
|
281
284
|
|
|
282
285
|
// values for heatmap
|
|
283
286
|
VBI.Vals = (function() {
|
|
284
|
-
"use strict";
|
|
285
287
|
function Vals(gl, width, height) {
|
|
286
288
|
this.m_GL = gl;
|
|
287
289
|
|
|
@@ -292,7 +294,7 @@ VBI.Vals = (function() {
|
|
|
292
294
|
this.m_W = width;
|
|
293
295
|
this.m_H = height;
|
|
294
296
|
|
|
295
|
-
this.m_Shader = new VBI.Shader(this.m_GL,
|
|
297
|
+
this.m_Shader = new VBI.Shader(this.m_GL,
|
|
296
298
|
"uniform vec4 uTM;" +
|
|
297
299
|
"attribute vec4 aPos;" +
|
|
298
300
|
"attribute float aValue;" +
|
|
@@ -421,7 +423,6 @@ VBI.Vals = (function() {
|
|
|
421
423
|
})();
|
|
422
424
|
|
|
423
425
|
VBI.Hm = (function() {
|
|
424
|
-
"use strict";
|
|
425
426
|
function Hm(oArgs) {
|
|
426
427
|
var calcAlpha; // shader fragment to calculate an alpha
|
|
427
428
|
var calcCol; // shader fragment to calculate the color
|
|
@@ -496,13 +497,13 @@ VBI.Hm = (function() {
|
|
|
496
497
|
scene.RenderAsync(false);
|
|
497
498
|
}
|
|
498
499
|
|
|
499
|
-
calcCol =
|
|
500
|
+
calcCol =
|
|
500
501
|
"uniform sampler2D colTex; " +
|
|
501
502
|
"vec3 calcCol( float g ){ " +
|
|
502
503
|
" return texture2D( colTex, vec2( g, 0.5 )).rgb; " +
|
|
503
504
|
"}";
|
|
504
505
|
} else {
|
|
505
|
-
calcCol =
|
|
506
|
+
calcCol =
|
|
506
507
|
"vec3 calcCol( float g ){ " +
|
|
507
508
|
" return smoothstep( vec3( 0.0, 0.0, 1.0 ), vec3( 1.0, 1.0, 0.0 ), vec3( g ) ); " +
|
|
508
509
|
"}";
|
|
@@ -510,19 +511,19 @@ VBI.Hm = (function() {
|
|
|
510
511
|
|
|
511
512
|
// assemble alpha usage shader code
|
|
512
513
|
if (oArgs.alpha) {
|
|
513
|
-
calcAlpha =
|
|
514
|
+
calcAlpha =
|
|
514
515
|
"vec4 calcAlpha(vec3 c,float i){ " +
|
|
515
516
|
" float a = smoothstep(" + (oArgs.alphaBounds[0].toFixed(8)) + "," + (oArgs.alphaBounds[1].toFixed(8)) + ", pow(i, 1.0)); " +
|
|
516
517
|
" return vec4( c*a, a); " +
|
|
517
518
|
"}";
|
|
518
519
|
} else {
|
|
519
|
-
calcAlpha =
|
|
520
|
+
calcAlpha =
|
|
520
521
|
"vec4 calcAlpha(vec3 c, float i){ " +
|
|
521
522
|
" return vec4(c, 1.0);" +
|
|
522
523
|
"}";
|
|
523
524
|
}
|
|
524
525
|
|
|
525
|
-
var fsVars =
|
|
526
|
+
var fsVars =
|
|
526
527
|
"#ifdef GL_FRAGMENT_PRECISION_HIGH \n" +
|
|
527
528
|
" precision highp int;" +
|
|
528
529
|
" precision highp float; \n" +
|
|
@@ -532,8 +533,8 @@ VBI.Hm = (function() {
|
|
|
532
533
|
"#endif \n" +
|
|
533
534
|
"uniform sampler2D src;" +
|
|
534
535
|
"varying vec2 txy;";
|
|
535
|
-
|
|
536
|
-
var fsMain =
|
|
536
|
+
|
|
537
|
+
var fsMain =
|
|
537
538
|
"void main(){ " +
|
|
538
539
|
" float f = clamp( texture2D(src, txy).r, 0.0, 1.0 ); " +
|
|
539
540
|
" vec3 color = calcCol(pow(f, " + (this.m_cFunc) + ")); " +
|
|
@@ -541,13 +542,13 @@ VBI.Hm = (function() {
|
|
|
541
542
|
"}";
|
|
542
543
|
|
|
543
544
|
// 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,
|
|
545
|
+
this.m_Shader = new VBI.Shader(this.m_GL,
|
|
545
546
|
"attribute vec4 pos; " +
|
|
546
547
|
"varying vec2 txy; " +
|
|
547
548
|
"void main(){ " +
|
|
548
549
|
" txy = pos.xy * 0.5 + 0.5; " +
|
|
549
550
|
" gl_Position = pos; " +
|
|
550
|
-
"}",
|
|
551
|
+
"}",
|
|
551
552
|
fsVars + calcCol + "\n" + calcAlpha + fsMain);
|
|
552
553
|
|
|
553
554
|
if (this.m_W == null) {
|
|
@@ -645,6 +646,7 @@ VBI.Hm = (function() {
|
|
|
645
646
|
})();
|
|
646
647
|
|
|
647
648
|
VBI.CreateHM = function(params) {
|
|
648
|
-
"use strict";
|
|
649
649
|
return new VBI.Hm(params);
|
|
650
650
|
};
|
|
651
|
+
|
|
652
|
+
});
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ! SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved
|
|
3
|
+
*/
|
|
3
4
|
|
|
5
|
+
// this module does the label handling
|
|
4
6
|
// Author: Martina Gozlinski, extraction by Jürgen
|
|
7
|
+
// First part enriches scene with label specific functions
|
|
8
|
+
// Second part consists of the VBI.Label object, formerly part of vobase
|
|
9
|
+
|
|
10
|
+
sap.ui.define([
|
|
11
|
+
"sap/ui/core/IconPool",
|
|
12
|
+
"./sapvbi"
|
|
13
|
+
], function(IconPool) {
|
|
14
|
+
"use strict"
|
|
5
15
|
|
|
6
|
-
// ...........................................................................//
|
|
7
|
-
// First part enriches scene with label specific functions //
|
|
8
|
-
// Second part consists of the VBI.Label object, formerly part of vobase //
|
|
9
16
|
/* global VBI */// declare unusual global vars for JSLint/SAPUI5 validation
|
|
10
17
|
VBI.addSceneLabelFunctions = function(scene) {
|
|
11
|
-
"use strict";
|
|
12
18
|
scene.InternalDrawLabelTexts = function(dc, label, textcolor, substrings) {
|
|
13
19
|
for (var nJ = 0; nJ < label.m_Pos.length; ++nJ) {
|
|
14
20
|
for (var nZ = 0; nZ < label.m_Pos[nJ].length; nZ++) {
|
|
@@ -115,8 +121,7 @@ VBI.addSceneLabelFunctions = function(scene) {
|
|
|
115
121
|
}
|
|
116
122
|
// rectangle for icon
|
|
117
123
|
if (label.m_Icon) {
|
|
118
|
-
|
|
119
|
-
label.m_IcInfo = sap.ui.core.IconPool.getIconInfo(label.m_Icon);
|
|
124
|
+
label.m_IcInfo = IconPool.getIconInfo(label.m_Icon);
|
|
120
125
|
if (label.m_IcInfo) {
|
|
121
126
|
var iconPosX = (label.m_Align == 7 && label.m_Arrow) ? startX : startX + width;
|
|
122
127
|
dc.fillStyle = label.m_IcBgrdCol;
|
|
@@ -235,8 +240,7 @@ VBI.addSceneLabelFunctions = function(scene) {
|
|
|
235
240
|
}
|
|
236
241
|
// rectangle for icon
|
|
237
242
|
if (label.m_Icon) {
|
|
238
|
-
|
|
239
|
-
label.m_IcInfo = sap.ui.core.IconPool.getIconInfo(label.m_Icon);
|
|
243
|
+
label.m_IcInfo = IconPool.getIconInfo(label.m_Icon);
|
|
240
244
|
if (label.m_IcInfo) {
|
|
241
245
|
var iconPosX = (label.m_Align == 7 && label.m_Arrow) ? startX : startX + width;
|
|
242
246
|
dc.fillStyle = label.m_IcBgrdCol;
|
|
@@ -361,7 +365,6 @@ VBI.addSceneLabelFunctions = function(scene) {
|
|
|
361
365
|
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> //
|
|
362
366
|
|
|
363
367
|
VBI.Label = function(label, nIndex, recalc, posarray, rcbox, aIO) {
|
|
364
|
-
"use strict";
|
|
365
368
|
this.m_bAligned = false;
|
|
366
369
|
this.mIndex = nIndex;
|
|
367
370
|
this.m_aIO = aIO;
|
|
@@ -555,3 +558,5 @@ VBI.Label = function(label, nIndex, recalc, posarray, rcbox, aIO) {
|
|
|
555
558
|
|
|
556
559
|
return this;
|
|
557
560
|
};
|
|
561
|
+
|
|
562
|
+
});
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ! SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved
|
|
3
|
+
*/
|
|
3
4
|
|
|
5
|
+
// this module does the label handling
|
|
4
6
|
// Author: Martina Gozlinski, extraction by Jürgen
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
VBI.addSceneLassoTrackingFunctions = function(scene) {
|
|
8
|
+
sap.ui.define(["./sapvbi"]
|
|
9
|
+
, function() {
|
|
9
10
|
"use strict";
|
|
10
11
|
|
|
12
|
+
/* global VBI */// declare unusual global vars for JSLint/SAPUI5 validation
|
|
13
|
+
VBI.addSceneLassoTrackingFunctions = function(scene) {
|
|
11
14
|
// ........................................................................//
|
|
12
15
|
// Lasso Tracking .........................................................//
|
|
13
16
|
// ........................................................................//
|
|
@@ -167,3 +170,5 @@ VBI.addSceneLassoTrackingFunctions = function(scene) {
|
|
|
167
170
|
};
|
|
168
171
|
|
|
169
172
|
};
|
|
173
|
+
|
|
174
|
+
});
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/*
|
|
2
|
+
* ! SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved
|
|
3
|
+
*/
|
|
3
4
|
|
|
5
|
+
// maplayer objects
|
|
4
6
|
// Author: Ulrich Roegelein
|
|
5
|
-
|
|
6
|
-
// mapprovider prototype functions...........................................//
|
|
7
|
+
// mapprovider prototype functions
|
|
7
8
|
// VBI.prototype = { this.prototype = { Add: function (source) { this.SourceArray.push( source ); }, }, }
|
|
8
9
|
// VBI.mapproviders = { this.prototype = { Add: function (mapprovider) { this.MapProviderArray.push( mapprovider ); }, }, }
|
|
9
|
-
|
|
10
|
-
// ...........................................................................//
|
|
11
|
-
// MapLayerStack namespace...................................................//
|
|
10
|
+
// MapLayerStack namespace
|
|
12
11
|
// enables: new VBI.MapLayerStackManager(...)
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
sap.ui.define(["./sapvbi"]
|
|
14
|
+
, function() {
|
|
15
15
|
"use strict";
|
|
16
|
+
|
|
17
|
+
VBI.MapLayerStackManager = function() {
|
|
16
18
|
/* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
|
|
17
19
|
var maplayerstackmanager = {};
|
|
18
20
|
maplayerstackmanager.vbiclass = "MapLayerStackManager";
|
|
@@ -77,7 +79,6 @@ VBI.MapLayerStacks = VBI.MapLayerStackManager();
|
|
|
77
79
|
// enables: new VBI.MapLayerStack(...)
|
|
78
80
|
|
|
79
81
|
VBI.MapLayerStack = function(name, description) {
|
|
80
|
-
"use strict";
|
|
81
82
|
var maplayerstack = {}; // create the object
|
|
82
83
|
maplayerstack.vbiclass = "MapLayerStack";
|
|
83
84
|
maplayerstack.m_MapLayerArray = [];
|
|
@@ -195,7 +196,6 @@ VBI.MapLayerStack = function(name, description) {
|
|
|
195
196
|
};
|
|
196
197
|
|
|
197
198
|
VBI.MapLayer = function() {
|
|
198
|
-
"use strict";
|
|
199
199
|
var maplayer = {}; // create the object
|
|
200
200
|
maplayer.vbiclass = "MapLayer";
|
|
201
201
|
maplayer.m_Name = null;
|
|
@@ -254,3 +254,5 @@ VBI.MapLayer = function() {
|
|
|
254
254
|
|
|
255
255
|
return maplayer;
|
|
256
256
|
};
|
|
257
|
+
|
|
258
|
+
});
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ! SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
// mapmanager object
|
|
2
6
|
// Author: Ulrich Roegelein
|
|
3
7
|
|
|
4
|
-
|
|
8
|
+
sap.ui.define(["./sapvbi"]
|
|
9
|
+
, function() {
|
|
5
10
|
"use strict";
|
|
11
|
+
|
|
12
|
+
VBI.MapManager = (function() {
|
|
6
13
|
/* global VBI */// declare unusual global vars for ESLint/SAPUI5 validation
|
|
7
14
|
var mapmanager = {};
|
|
8
15
|
mapmanager.vbiclass = "MapManager";
|
|
@@ -24,11 +31,11 @@ VBI.MapManager = (function() {
|
|
|
24
31
|
* Increments and Decrements counters related to tile download connections
|
|
25
32
|
*
|
|
26
33
|
* @private
|
|
27
|
-
* @param {Image} image - Image object to track counters agains
|
|
34
|
+
* @param {Image} image - Image object to track counters agains
|
|
28
35
|
* @param {number} factor - A positive or negative integer to be added to the counter
|
|
29
36
|
*/
|
|
30
37
|
mapmanager._modifyReqCounters = function(image, factor) {
|
|
31
|
-
if (image.m_Headers) { // if headers presents -> this is xhr request
|
|
38
|
+
if (image.m_Headers) { // if headers presents -> this is xhr request
|
|
32
39
|
mapmanager.m_runningXhrRequests += factor;
|
|
33
40
|
} else {
|
|
34
41
|
mapmanager.m_runningRequests += factor;
|
|
@@ -473,7 +480,7 @@ VBI.MapManager = (function() {
|
|
|
473
480
|
image.onabort = mapmanager.onAbort;
|
|
474
481
|
|
|
475
482
|
//If the provider has headers defined, then we must use the HTTP Request approach
|
|
476
|
-
//as it is possible that the application provided an image via the URL callback, we check for a data url before proceeding with the HTTP Request creation
|
|
483
|
+
//as it is possible that the application provided an image via the URL callback, we check for a data url before proceeding with the HTTP Request creation
|
|
477
484
|
if (mapProv.m_Headers && url.substring(0, 5).toLowerCase() != "data:") {
|
|
478
485
|
image.m_Headers = mapProv.m_Headers;
|
|
479
486
|
image.src2execute = url; //store the URL in case the request ends up being queued
|
|
@@ -693,7 +700,7 @@ VBI.MapManager = (function() {
|
|
|
693
700
|
* @param {boolean} preview - True if image is requested for preview.
|
|
694
701
|
*/
|
|
695
702
|
mapmanager._createHttpRequest = function(image, preview) {
|
|
696
|
-
if (preview || mapmanager.m_runningXhrRequests < mapmanager.m_limitRequests) { // 'preview' images
|
|
703
|
+
if (preview || mapmanager.m_runningXhrRequests < mapmanager.m_limitRequests) { // 'preview' images not restricted
|
|
697
704
|
if (!preview) { // modify counter only if it is not a 'preview' image
|
|
698
705
|
mapmanager._modifyReqCounters(image, 1);
|
|
699
706
|
}
|
|
@@ -774,3 +781,5 @@ VBI.MapManager = (function() {
|
|
|
774
781
|
|
|
775
782
|
return mapmanager;
|
|
776
783
|
})();
|
|
784
|
+
|
|
785
|
+
});
|