@sapui5/sap.ui.vbm 1.136.0 → 1.136.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.
- package/package.json +1 -1
- package/src/sap/ui/vbm/.library +2 -2
- package/src/sap/ui/vbm/Adapter.js +1 -1
- package/src/sap/ui/vbm/Adapter3D.js +195 -53
- package/src/sap/ui/vbm/AnalyticMap.js +10 -8
- package/src/sap/ui/vbm/ClusterRenderer.js +28 -4
- package/src/sap/ui/vbm/ContainerBase.js +4 -4
- package/src/sap/ui/vbm/MapContainer.js +3 -2
- package/src/sap/ui/vbm/MapContainerButtonType.js +1 -0
- package/src/sap/ui/vbm/Viewport.js +1 -1
- package/src/sap/ui/vbm/VoBase.js +5 -4
- package/src/sap/ui/vbm/adapter3d/ColladaBounds.js +1 -1
- package/src/sap/ui/vbm/adapter3d/DragDropHandler.js +14 -2
- package/src/sap/ui/vbm/adapter3d/ModelHandler.js +1 -1
- package/src/sap/ui/vbm/adapter3d/ObjectFactory.js +1 -1
- package/src/sap/ui/vbm/adapter3d/PolygonHandler.js +1 -1
- package/src/sap/ui/vbm/adapter3d/RectangleTracker.js +199 -170
- package/src/sap/ui/vbm/adapter3d/SceneBuilder.js +1 -1
- package/src/sap/ui/vbm/adapter3d/VBIJSONParser.js +1 -1
- package/src/sap/ui/vbm/library.js +11 -7
- package/src/sap/ui/vbm/vector/MapRenderer.js +204 -30
- package/src/sap/ui/vbm/vector/PayloadGenerator.js +1 -1
- package/src/sap/ui/vbm/vector/RectangularSelection.js +1 -1
- package/src/sap/ui/vbm/vector/VBITransformer.js +64 -17
- package/src/sap/ui/vbm/vector/VectorUtils.js +124 -13
- package/ui5.yaml +1 -1
package/package.json
CHANGED
package/src/sap/ui/vbm/.library
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<name>sap.ui.vbm</name>
|
|
4
4
|
<vendor>SAP SE</vendor>
|
|
5
5
|
<copyright>SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved</copyright>
|
|
6
|
-
<version>1.136.
|
|
6
|
+
<version>1.136.2</version>
|
|
7
7
|
|
|
8
8
|
<documentation>SAP UI library: sap.ui.vbm</documentation>
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<libraryName>sap.ui.core</libraryName>
|
|
13
13
|
</dependency>
|
|
14
14
|
<dependency>
|
|
15
|
-
<libraryName>sap.
|
|
15
|
+
<libraryName>sap.m</libraryName>
|
|
16
16
|
<lazy>true</lazy>
|
|
17
17
|
</dependency>
|
|
18
18
|
<dependency>
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
25
25
|
* @param {object} [mSettings] initial settings for the new object
|
|
26
26
|
* @author SAP SE
|
|
27
|
-
* @version 1.136.
|
|
27
|
+
* @version 1.136.2
|
|
28
28
|
* @extends sap.ui.core.Element
|
|
29
29
|
* @constructor
|
|
30
30
|
* @public
|
|
@@ -47,7 +47,7 @@ sap.ui.define([
|
|
|
47
47
|
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
48
48
|
* @param {object} [mSettings] initial settings for the new object
|
|
49
49
|
* @author SAP SE
|
|
50
|
-
* @version 1.136.
|
|
50
|
+
* @version 1.136.2
|
|
51
51
|
* @extends sap.ui.core.Element
|
|
52
52
|
* @constructor
|
|
53
53
|
* @public
|
|
@@ -238,7 +238,7 @@ sap.ui.define([
|
|
|
238
238
|
|
|
239
239
|
this._colladaBounds = null;
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
|
|
242
242
|
// this._lassoTracker = null;
|
|
243
243
|
};
|
|
244
244
|
|
|
@@ -330,7 +330,7 @@ sap.ui.define([
|
|
|
330
330
|
this._rectangleTracker = new RectangleTracker(this);
|
|
331
331
|
// // this._lassoTracker = new LassoTracker(this);
|
|
332
332
|
// if(rectangleSelect)
|
|
333
|
-
|
|
333
|
+
|
|
334
334
|
// if(lassoSelect && !rectangleSelect)
|
|
335
335
|
// {
|
|
336
336
|
// this._lassoSelect = "created";
|
|
@@ -348,7 +348,7 @@ sap.ui.define([
|
|
|
348
348
|
this._dragDropHandler.destroy();
|
|
349
349
|
this._dragDropHandler = null;
|
|
350
350
|
this._colladaBounds = null;
|
|
351
|
-
|
|
351
|
+
this._rectangleTracker = null;
|
|
352
352
|
// this._lassoTracker = null;
|
|
353
353
|
this._viewport.removeEventDelegate(viewportEventDelegate);
|
|
354
354
|
// onBeforeRendering unsubscribes from DOM events.
|
|
@@ -421,51 +421,51 @@ sap.ui.define([
|
|
|
421
421
|
that._viewport.setBusy(true);
|
|
422
422
|
|
|
423
423
|
that._update = that._update
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
424
|
+
.then(function() {
|
|
425
|
+
that._parser.loadVBIJSON(payload);
|
|
426
|
+
|
|
427
|
+
return that._sceneBuilder.synchronize();
|
|
428
|
+
})
|
|
429
|
+
.then(function() {
|
|
430
|
+
// further processing after scene(s) has been updated
|
|
431
|
+
that._processAutomation(payload);
|
|
432
|
+
that._processDetailWindow();
|
|
433
|
+
// that._createCollada(payload);
|
|
434
|
+
// check if last hover instance is still exist (it may be erased during update)
|
|
435
|
+
that._context.voQueues.toRemove.forEach(function(instances) {
|
|
436
|
+
instances.forEach(function(instance) {
|
|
437
|
+
if (that._hoverInstance === instance) {
|
|
438
|
+
that._hoverInstance = null;
|
|
439
|
+
}
|
|
440
|
+
}, that);
|
|
440
441
|
}, that);
|
|
441
|
-
}, that);
|
|
442
442
|
|
|
443
443
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
444
|
+
if (that._colladaBounds) {
|
|
445
|
+
that._colladaBounds.initialize();
|
|
446
|
+
}
|
|
447
447
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
// scene has changed -> adjust camera clipping planes
|
|
454
|
-
that._viewport._resetBBox();
|
|
455
|
-
that._viewport._updateCamera();
|
|
448
|
+
// update drag and drop handler
|
|
449
|
+
if (that._dragDropHandler) {
|
|
450
|
+
that._dragDropHandler.update();
|
|
451
|
+
}
|
|
456
452
|
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
that._context.windowQueues.clear();
|
|
453
|
+
// scene has changed -> adjust camera clipping planes
|
|
454
|
+
that._viewport._resetBBox();
|
|
455
|
+
that._viewport._updateCamera();
|
|
461
456
|
|
|
462
|
-
|
|
463
|
-
|
|
457
|
+
// clear before next update
|
|
458
|
+
that._context.voQueues.clear();
|
|
459
|
+
that._context.sceneQueues.clear();
|
|
460
|
+
that._context.windowQueues.clear();
|
|
461
|
+
|
|
462
|
+
that._viewport.setBusy(false);
|
|
463
|
+
});
|
|
464
464
|
// return last promise in chain
|
|
465
|
-
|
|
465
|
+
|
|
466
466
|
return that._update;
|
|
467
467
|
};
|
|
468
|
-
|
|
468
|
+
|
|
469
469
|
Adapter3D.prototype._processDetailWindow = function(payload) {
|
|
470
470
|
// show first only detail window from toAdd queue
|
|
471
471
|
// ignore all other detail windows as we can show only one at a time in compare to ActiveX implementation
|
|
@@ -791,12 +791,12 @@ sap.ui.define([
|
|
|
791
791
|
};
|
|
792
792
|
|
|
793
793
|
Adapter3D.prototype._genericEventHandler = function(name, event) {
|
|
794
|
-
|
|
794
|
+
|
|
795
795
|
var homeButtonKey = Utilities.parseKeyboardShortcut(this._context.config.has("HOME_VIEW") ? this._context.config.get("HOME_VIEW") : "72");
|
|
796
|
-
|
|
796
|
+
|
|
797
797
|
if (Utilities.matchKeyboardShortcut(event, homeButtonKey)) {
|
|
798
798
|
this._viewport.applyCameraHome(false); // no fly-to animation needed here
|
|
799
|
-
|
|
799
|
+
return;
|
|
800
800
|
}
|
|
801
801
|
|
|
802
802
|
var instance = event.instance;
|
|
@@ -1167,9 +1167,9 @@ sap.ui.define([
|
|
|
1167
1167
|
this._skipClick = false;
|
|
1168
1168
|
this._handleHover(event);
|
|
1169
1169
|
} else if (this._clickTimerId) {
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1170
|
+
clearTimeout(this._clickTimerId);
|
|
1171
|
+
this._clickTimerId = null;
|
|
1172
|
+
this._handleDoubleClick(event);
|
|
1173
1173
|
} else {
|
|
1174
1174
|
this._clickTimerId = setTimeout(function() {
|
|
1175
1175
|
this._clickTimerId = null;
|
|
@@ -1193,6 +1193,14 @@ sap.ui.define([
|
|
|
1193
1193
|
* @private
|
|
1194
1194
|
*/
|
|
1195
1195
|
Adapter3D.prototype._extendEventWithSelection = function(event) {
|
|
1196
|
+
|
|
1197
|
+
// As we want to manintain the state of object(selected/not selected)
|
|
1198
|
+
// In case of drag and drop we will not calling further function
|
|
1199
|
+
if (this._dragDropHandler.isDragAndDrop) {
|
|
1200
|
+
this._dragDropHandler.isDragAndDrop = false;
|
|
1201
|
+
return;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1196
1204
|
var instance = event.instance;
|
|
1197
1205
|
if (instance) {
|
|
1198
1206
|
if (event.originalEvent.type === "click") {
|
|
@@ -1210,10 +1218,19 @@ sap.ui.define([
|
|
|
1210
1218
|
action = "select";
|
|
1211
1219
|
exclusive = true;
|
|
1212
1220
|
}
|
|
1213
|
-
|
|
1221
|
+
if (instance.object3D) {
|
|
1222
|
+
event.selectionChanges = this._changeSelectionAddtvAndSubtv(instance, action, exclusive);
|
|
1223
|
+
} else {
|
|
1224
|
+
event.selectionChanges = this._changeSelection(instance, action, exclusive);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1214
1227
|
}
|
|
1215
1228
|
} else {
|
|
1216
|
-
|
|
1229
|
+
if (instance.object3D) {
|
|
1230
|
+
event.selectionChanges = this._changeSelectionAddtvAndSubtv(instance, "toggle", false);
|
|
1231
|
+
} else {
|
|
1232
|
+
event.selectionChanges = this._changeSelection(instance, "toggle", false);
|
|
1233
|
+
}
|
|
1217
1234
|
}
|
|
1218
1235
|
}
|
|
1219
1236
|
};
|
|
@@ -1252,7 +1269,7 @@ sap.ui.define([
|
|
|
1252
1269
|
deselected = group.selected.splice(0);
|
|
1253
1270
|
}
|
|
1254
1271
|
group.selected.push(instance);
|
|
1255
|
-
selected = [
|
|
1272
|
+
selected = [instance];
|
|
1256
1273
|
}
|
|
1257
1274
|
}
|
|
1258
1275
|
} else if (action === "toggle") {
|
|
@@ -1269,15 +1286,15 @@ sap.ui.define([
|
|
|
1269
1286
|
}
|
|
1270
1287
|
// Select instance
|
|
1271
1288
|
group.selected.push(instance);
|
|
1272
|
-
selected = [
|
|
1289
|
+
selected = [instance];
|
|
1273
1290
|
}
|
|
1274
1291
|
}
|
|
1275
1292
|
|
|
1276
|
-
selected.forEach(function(instance) {
|
|
1293
|
+
selected.forEach(function (instance) {
|
|
1277
1294
|
instance["VB:s"] = "true";
|
|
1278
1295
|
});
|
|
1279
1296
|
|
|
1280
|
-
deselected.forEach(function(instance) {
|
|
1297
|
+
deselected.forEach(function (instance) {
|
|
1281
1298
|
instance["VB:s"] = "false";
|
|
1282
1299
|
});
|
|
1283
1300
|
|
|
@@ -1285,7 +1302,132 @@ sap.ui.define([
|
|
|
1285
1302
|
selected: selected,
|
|
1286
1303
|
deselected: deselected
|
|
1287
1304
|
}
|
|
1288
|
-
|
|
1305
|
+
};
|
|
1306
|
+
|
|
1307
|
+
Adapter3D.prototype._changeSelectionAddtvAndSubtv = function (instance, action, exclusive) {
|
|
1308
|
+
var selected = [];
|
|
1309
|
+
var deselected = [];
|
|
1310
|
+
var group = instance.voGroup;
|
|
1311
|
+
var wasSelected = toBoolean(instance["VB:s"]);
|
|
1312
|
+
var selectedIndex;
|
|
1313
|
+
|
|
1314
|
+
if (action === "select") {
|
|
1315
|
+
if (group.maxSel !== "0") {
|
|
1316
|
+
if (wasSelected) {
|
|
1317
|
+
if (exclusive) {
|
|
1318
|
+
// Deselect other selected instances in the group.
|
|
1319
|
+
selectedIndex = group.selected.indexOf(instance);
|
|
1320
|
+
|
|
1321
|
+
// it was manually selected
|
|
1322
|
+
if (selectedIndex >= 0) {
|
|
1323
|
+
deselected = group.selected.splice(selectedIndex + 1).concat(group.selected.splice(0, selectedIndex));
|
|
1324
|
+
|
|
1325
|
+
// deselect all elements from rect selection as well
|
|
1326
|
+
let found = [...this._rectangleTracker._selected];
|
|
1327
|
+
for (let i = 0; i < found.length; i++) {
|
|
1328
|
+
if (instance != found[i]._sapInstance) {
|
|
1329
|
+
deselected.push(found[i]._sapInstance);
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
// To remove any dups present
|
|
1334
|
+
deselected = [...new Map(deselected.map(item => [item.id, item])).values()];
|
|
1335
|
+
|
|
1336
|
+
this._rectangleTracker._selected.clear();
|
|
1337
|
+
} else {
|
|
1338
|
+
// considering it is from rect selection.
|
|
1339
|
+
let matchingInstance = [...this._rectangleTracker._selected].find(u => u.uuid === instance.object3D.uuid);
|
|
1340
|
+
|
|
1341
|
+
deselected = group.selected.splice(0);
|
|
1342
|
+
|
|
1343
|
+
// deselect all elements from rect selection as well
|
|
1344
|
+
let found = [...this._rectangleTracker._selected];
|
|
1345
|
+
for (let i = 0; i < found.length; i++) {
|
|
1346
|
+
|
|
1347
|
+
if (matchingInstance.uuid != found[i].uuid) {
|
|
1348
|
+
deselected.push(found[i]._sapInstance);
|
|
1349
|
+
this._rectangleTracker._selected.delete(found[i]);
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
// To remove any dups present
|
|
1354
|
+
deselected = [...new Map(deselected.map(item => [item.id, item])).values()];
|
|
1355
|
+
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
}
|
|
1359
|
+
} else {
|
|
1360
|
+
if (exclusive || group.maxSel === "1") {
|
|
1361
|
+
|
|
1362
|
+
// Deselect other selected instances in the group.
|
|
1363
|
+
selectedIndex = group.selected.indexOf(instance);
|
|
1364
|
+
|
|
1365
|
+
if (selectedIndex >= 0) {
|
|
1366
|
+
deselected = group.selected.splice(selectedIndex + 1).concat(group.selected.splice(0, selectedIndex));
|
|
1367
|
+
} else {
|
|
1368
|
+
deselected = group.selected.splice(0);
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
let found = [...this._rectangleTracker._selected];
|
|
1372
|
+
for (let i = 0; i < found.length; i++) {
|
|
1373
|
+
deselected.push(found[i]._sapInstance);
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
// To remove any dups present
|
|
1377
|
+
deselected = [...new Map(deselected.map(item => [item.id, item])).values()];
|
|
1378
|
+
|
|
1379
|
+
this._rectangleTracker._selected.clear();
|
|
1380
|
+
}
|
|
1381
|
+
if (!selectedIndex || selectedIndex < 0) {
|
|
1382
|
+
group.selected.push(instance);
|
|
1383
|
+
}
|
|
1384
|
+
selected = [instance];
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
} else if (action === "toggle") {
|
|
1388
|
+
if (wasSelected) {
|
|
1389
|
+
if (group.minSel === "0" || group.selected.length > 1) {
|
|
1390
|
+
// Deselect instance
|
|
1391
|
+
selectedIndex = group.selected.indexOf(instance);
|
|
1392
|
+
let found = [...this._rectangleTracker._selected].find(u => u.uuid === instance.object3D.uuid);
|
|
1393
|
+
|
|
1394
|
+
if (found) {
|
|
1395
|
+
this._rectangleTracker._selected.delete(found);
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
// if the instance id previously selected and we are still not able to get it in data
|
|
1399
|
+
// we can still go ahead and that instance in deselected array to deselect it.
|
|
1400
|
+
if (selectedIndex < 0) {
|
|
1401
|
+
deselected.push(instance);
|
|
1402
|
+
} else {
|
|
1403
|
+
deselected = group.selected.splice(selectedIndex, 1);
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
}
|
|
1407
|
+
} else if (group.maxSel !== "0") {
|
|
1408
|
+
if (group.maxSel === "1") {
|
|
1409
|
+
// Deselect all
|
|
1410
|
+
deselected = group.selected.splice(0);
|
|
1411
|
+
}
|
|
1412
|
+
// Select instance
|
|
1413
|
+
group.selected.push(instance);
|
|
1414
|
+
selected = [instance];
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
selected.forEach(function (instance) {
|
|
1419
|
+
instance["VB:s"] = "true";
|
|
1420
|
+
});
|
|
1421
|
+
|
|
1422
|
+
deselected.forEach(function (instance) {
|
|
1423
|
+
instance["VB:s"] = "false";
|
|
1424
|
+
});
|
|
1425
|
+
|
|
1426
|
+
return {
|
|
1427
|
+
selected: selected,
|
|
1428
|
+
deselected: deselected
|
|
1429
|
+
}
|
|
1430
|
+
};
|
|
1289
1431
|
|
|
1290
1432
|
|
|
1291
1433
|
Adapter3D.prototype.enableRectangularSelection = function() {
|
|
@@ -117,11 +117,12 @@ sap.ui.define([
|
|
|
117
117
|
"_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor",
|
|
118
118
|
"_sap_ui_vbm_shared_ChartDataPointNotSelectedBackgroundOpacity"
|
|
119
119
|
] });
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
AnalyticMap.
|
|
123
|
-
AnalyticMap.
|
|
124
|
-
|
|
120
|
+
const isValues= Object.keys(values || {}).length > 0;
|
|
121
|
+
|
|
122
|
+
AnalyticMap.DefaultRegionColor = isValues?values["_sap_ui_vbm_shared_ChoroplethRegionBG"] : "rgb(213,218,221)";
|
|
123
|
+
AnalyticMap.DefaultRegionColorBorder = isValues?values["_sap_ui_vbm_shared_ChoroplethRegionBorder"] : "rgb(255,255,255)";
|
|
124
|
+
AnalyticMap.AltBorderColor = isValues?values["_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor"] : "#676767";
|
|
125
|
+
nonSelectOpacity = isValues?values["_sap_ui_vbm_shared_ChartDataPointNotSelectedBackgroundOpacity"] : "0.6";
|
|
125
126
|
|
|
126
127
|
AnalyticMap.DefaultRegionNonSelectColor = "RHLSA(0;1;1;" + nonSelectOpacity + ")";
|
|
127
128
|
|
|
@@ -300,7 +301,7 @@ sap.ui.define([
|
|
|
300
301
|
xhr.open("GET", sPathGeoJSON, false); // set 'false' to make it synchronous
|
|
301
302
|
xhr.send();
|
|
302
303
|
|
|
303
|
-
if (xhr.status === 200) {
|
|
304
|
+
if (xhr.status === 200 && !!xhr.responseText) {
|
|
304
305
|
oData = JSON.parse(xhr.responseText);
|
|
305
306
|
} else {
|
|
306
307
|
// Handle error
|
|
@@ -992,8 +993,9 @@ sap.ui.define([
|
|
|
992
993
|
"_sap_ui_vbm_shared_ChoroplethRegionBG",
|
|
993
994
|
"_sap_ui_vbm_shared_ChoroplethRegionBorder"
|
|
994
995
|
] });
|
|
995
|
-
|
|
996
|
-
|
|
996
|
+
const isValues= Object.keys(oColValues || {}).length > 0;
|
|
997
|
+
sColC = AnalyticMap.DefaultRegionColor = isValues? oColValues["_sap_ui_vbm_shared_ChoroplethRegionBG"] : AnalyticMap.DefaultRegionColor;
|
|
998
|
+
sColCB = AnalyticMap.DefaultRegionColorBorder = isValues? oColValues["_sap_ui_vbm_shared_ChoroplethRegionBorder"] : AnalyticMap.DefaultRegionColorBorder;
|
|
997
999
|
if (this.getPlugin()) { // plug-in mode -> make sure color format matches plugin requirements
|
|
998
1000
|
sColC = window.VBI.Utilities.String2VBColor(sColC);
|
|
999
1001
|
sColCB = window.VBI.Utilities.String2VBColor(sColCB);
|
|
@@ -86,7 +86,13 @@ sap.ui.define([
|
|
|
86
86
|
var ariaRoleDescription = sap.ui.core.AccessibleRole.Description;
|
|
87
87
|
|
|
88
88
|
oRm.openStart("div", Id1);
|
|
89
|
-
|
|
89
|
+
if (typeof classOuter === "string") {
|
|
90
|
+
var cOuter = classOuter.split(" ");
|
|
91
|
+
|
|
92
|
+
for (var iCOuter = 0; iCOuter < cOuter.length; iCOuter++) {
|
|
93
|
+
oRm.class(cOuter[iCOuter]);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
90
96
|
|
|
91
97
|
if (type == sap.ui.vbm.SemanticType.None && col) {
|
|
92
98
|
oRm.style("border-color", col)
|
|
@@ -95,7 +101,13 @@ sap.ui.define([
|
|
|
95
101
|
oRm.openEnd();
|
|
96
102
|
|
|
97
103
|
oRm.openStart("div", Id2);
|
|
98
|
-
|
|
104
|
+
if (typeof classInner === "string") {
|
|
105
|
+
var cInner = classInner.split(" ");
|
|
106
|
+
|
|
107
|
+
for (var iCInner = 0; iCInner < cInner.length; iCInner++) {
|
|
108
|
+
oRm.class(cInner[iCInner]);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
99
111
|
if (type == sap.ui.vbm.SemanticType.None && col) {
|
|
100
112
|
oRm.style("border-color", col)
|
|
101
113
|
}
|
|
@@ -108,7 +120,13 @@ sap.ui.define([
|
|
|
108
120
|
if (icon) {
|
|
109
121
|
var IdIcon = oControl.getId() + "-" + "icon";
|
|
110
122
|
oRm.openStart("span", IdIcon);
|
|
111
|
-
|
|
123
|
+
if (typeof classIcon === "string") {
|
|
124
|
+
var cIcon = classIcon.split(" ");
|
|
125
|
+
|
|
126
|
+
for (var iCIcon = 0; iCIcon < cIcon.length; iCIcon++) {
|
|
127
|
+
oRm.class(cIcon[iCIcon]);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
112
130
|
if (type == sap.ui.vbm.SemanticType.None && col) {
|
|
113
131
|
oRm.style("color", col)
|
|
114
132
|
}
|
|
@@ -122,7 +140,13 @@ sap.ui.define([
|
|
|
122
140
|
if ((oControl.getText())) {
|
|
123
141
|
var IdTextbox = oControl.getId() + "-" + "textbox";
|
|
124
142
|
oRm.openStart("div", IdTextbox);
|
|
125
|
-
|
|
143
|
+
if (typeof classTextbox === "string") {
|
|
144
|
+
var cTextBox = classTextbox.split(" ");
|
|
145
|
+
|
|
146
|
+
for (var iCTBox = 0; iCTBox < cTextBox.length; iCTBox++) {
|
|
147
|
+
oRm.class(cTextBox[iCTBox]);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
126
150
|
if (type == sap.ui.vbm.SemanticType.None && col) {
|
|
127
151
|
oRm.style("border-color", col);
|
|
128
152
|
}
|
|
@@ -299,7 +299,7 @@ sap.ui.define([
|
|
|
299
299
|
// segmentedButton for for multiple content entries
|
|
300
300
|
this._oContentSegmentedButton = new SegmentedButton({
|
|
301
301
|
layoutData: oLayoutData.clone(),
|
|
302
|
-
|
|
302
|
+
selectionChange: this._onContentButtonSelect.bind(this)
|
|
303
303
|
});
|
|
304
304
|
|
|
305
305
|
// Left side...
|
|
@@ -628,12 +628,12 @@ sap.ui.define([
|
|
|
628
628
|
ContainerBase.prototype._contentChange = function() {
|
|
629
629
|
var aContent = this.getContent();
|
|
630
630
|
// remove and destroy all buttons for old content
|
|
631
|
-
this._oContentSegmentedButton.
|
|
631
|
+
this._oContentSegmentedButton.removeAllItems();
|
|
632
632
|
this._destroyButtons(this._aContentIcons);
|
|
633
633
|
|
|
634
634
|
this._aContentIcons = [];
|
|
635
635
|
if (aContent.length === 0) {
|
|
636
|
-
this._oContentSegmentedButton.
|
|
636
|
+
this._oContentSegmentedButton.removeAllItems();
|
|
637
637
|
this._setDefaultOnSegmentedButton();
|
|
638
638
|
this.switchContent(null);
|
|
639
639
|
}
|
|
@@ -660,7 +660,7 @@ sap.ui.define([
|
|
|
660
660
|
};
|
|
661
661
|
|
|
662
662
|
ContainerBase.prototype._onContentButtonSelect = function(oEvent) {
|
|
663
|
-
var sContentId = oEvent.getParameter("
|
|
663
|
+
var sContentId = oEvent.getParameter("item").getKey();
|
|
664
664
|
this._switchContent(sContentId);
|
|
665
665
|
};
|
|
666
666
|
|
|
@@ -86,7 +86,7 @@ sap.ui.define([
|
|
|
86
86
|
* List Panel aggregation
|
|
87
87
|
*/
|
|
88
88
|
"listPanelStack": {
|
|
89
|
-
type: "sap.ui.
|
|
89
|
+
type: "sap.ui.vbm.ListPanelStack",
|
|
90
90
|
multiple: false
|
|
91
91
|
},
|
|
92
92
|
/**
|
|
@@ -267,7 +267,8 @@ sap.ui.define([
|
|
|
267
267
|
this._box = new sap.m.HBox().addStyleClass("mapContainerHboxPopover");
|
|
268
268
|
|
|
269
269
|
this._popover = new sap.m.Popover({
|
|
270
|
-
|
|
270
|
+
horizontalScrolling: false,
|
|
271
|
+
verticalScrolling: false,
|
|
271
272
|
placement: sap.m.PlacementType.Horizontal,
|
|
272
273
|
content: this._box,
|
|
273
274
|
showHeader: false
|
package/src/sap/ui/vbm/VoBase.js
CHANGED
|
@@ -341,10 +341,11 @@ sap.ui.define([
|
|
|
341
341
|
"_sap_ui_vbm_shared_ChartGood",
|
|
342
342
|
"_sap_ui_vbm_shared_ChartNeutral"] });
|
|
343
343
|
|
|
344
|
-
|
|
345
|
-
VoBase.prototype.
|
|
346
|
-
VoBase.prototype.
|
|
347
|
-
VoBase.prototype.
|
|
344
|
+
const isValues= Object.keys(colorParams || {}).length > 0;
|
|
345
|
+
VoBase.prototype.DefaultColorBad = isValues? colorParams["_sap_ui_vbm_shared_ChartBad"] : "rgb(211, 32, 48)";
|
|
346
|
+
VoBase.prototype.DefaultColorCritical = isValues? colorParams["_sap_ui_vbm_shared_ChartCritical"] : "rgb(225, 123, 36)";
|
|
347
|
+
VoBase.prototype.DefaultColorGood = isValues? colorParams["_sap_ui_vbm_shared_ChartGood"] : "rgb(97, 166, 86)";
|
|
348
|
+
VoBase.prototype.DefaultColorNeutral = isValues? colorParams["_sap_ui_vbm_shared_ChartNeutral"] : "rgb(132, 143, 148)";
|
|
348
349
|
|
|
349
350
|
// VO Interface implementation ..............................................//
|
|
350
351
|
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
*
|
|
23
23
|
* @private
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.136.
|
|
25
|
+
* @version 1.136.2
|
|
26
26
|
* @alias sap.ui.vbm.adapter3d.ColladaBounds
|
|
27
27
|
*/
|
|
28
28
|
var ColladaBounds = BaseObject.extend("sap.ui.vbm.adapter3d.ColladaBounds", /** @lends sap.ui.vbm.adapter3d.ColladaBounds.prototype */ {
|
|
@@ -83,7 +83,7 @@ sap.ui.define([
|
|
|
83
83
|
*
|
|
84
84
|
* @private
|
|
85
85
|
* @author SAP SE
|
|
86
|
-
* @version 1.136.
|
|
86
|
+
* @version 1.136.2
|
|
87
87
|
* @alias sap.ui.vbm.adapter3d.DragDropHandler
|
|
88
88
|
*/
|
|
89
89
|
var DragDropHandler = BaseObject.extend("sap.ui.vbm.adapter3d.DragDropHandler", /** @lends sap.ui.vbm.adapter3d.DragDropHandler.prototype */ {
|
|
@@ -99,6 +99,9 @@ sap.ui.define([
|
|
|
99
99
|
this._camera = this._viewport._camera;
|
|
100
100
|
this._cameraControls = this._viewport._cameraController;
|
|
101
101
|
|
|
102
|
+
// to detect the dragAndDrop happened
|
|
103
|
+
this.isDragAndDrop = false;
|
|
104
|
+
|
|
102
105
|
// current action state
|
|
103
106
|
this._state = STATE.PICK;
|
|
104
107
|
|
|
@@ -638,7 +641,16 @@ sap.ui.define([
|
|
|
638
641
|
var posAlias = this._adapter._parser.getAttributeAlias(dataType, posAttr);
|
|
639
642
|
var keyAlias = this._adapter._parser.getAttributeAlias(dataType, instance.voGroup.keyAttributeName);
|
|
640
643
|
var pos = instance.object3D.position;
|
|
641
|
-
var value = pos.x.toFixed(5) + ";" + pos.y.toFixed(5) + ";" + pos.z.toFixed(5);
|
|
644
|
+
var value = pos.x.toFixed(5) + ";" + pos.y.toFixed(5) + ";" + pos.z.toFixed(5); // new pos
|
|
645
|
+
|
|
646
|
+
var strInitialPos = instance.pos.split(";"); // prev pos
|
|
647
|
+
var vectorInitialPos = new Vector3(parseFloat(strInitialPos[0]), parseFloat(strInitialPos[1]), parseFloat(strInitialPos[2]));
|
|
648
|
+
|
|
649
|
+
if (vectorInitialPos.distanceTo(pos) > 0.5) { // fault tolerence
|
|
650
|
+
this.isDragAndDrop = true;
|
|
651
|
+
} else {
|
|
652
|
+
this.isDragAndDrop = false;
|
|
653
|
+
}
|
|
642
654
|
|
|
643
655
|
// make sure position is updated in all 3 places:
|
|
644
656
|
// evaluated instance
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
*
|
|
30
30
|
* @private
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.136.
|
|
32
|
+
* @version 1.136.2
|
|
33
33
|
* @alias sap.ui.vbm.adapter3d.ModelHandler
|
|
34
34
|
*/
|
|
35
35
|
var ModelHandler = BaseObject.extend("sap.ui.vbm.adapter3d.ModelHandler", /** @lends sap.ui.vbm.adapter3d.ModelHandler.prototype */ {
|
|
@@ -377,7 +377,7 @@ sap.ui.define([
|
|
|
377
377
|
*
|
|
378
378
|
* @private
|
|
379
379
|
* @author SAP SE
|
|
380
|
-
* @version 1.136.
|
|
380
|
+
* @version 1.136.2
|
|
381
381
|
* @alias sap.ui.vbm.adapter3d.ObjectFactory
|
|
382
382
|
*/
|
|
383
383
|
var ObjectFactory = BaseObject.extend("sap.ui.vbm.adapter3d.ObjectFactory", /** @lends sap.ui.vbm.adapter3d.ObjectFactory.prototype */ {});
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
*
|
|
33
33
|
* @private
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.136.
|
|
35
|
+
* @version 1.136.2
|
|
36
36
|
* @alias sap.ui.vbm.adapter3d.PolygonHandler
|
|
37
37
|
*/
|
|
38
38
|
var PolygonHandler = BaseObject.extend("sap.ui.vbm.adapter3d.PolygonHandler", /** @lends sap.ui.vbm.adapter3d.PolygonHandler.prototype */ {
|