@sapui5/sap.ui.vbm 1.141.0 → 1.142.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ui.vbm",
3
- "version": "1.141.0",
3
+ "version": "1.142.0",
4
4
  "description": "SAPUI5 Library sap.ui.vbm",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -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.141.0</version>
6
+ <version>1.142.0</version>
7
7
 
8
8
  <documentation>SAP UI library: sap.ui.vbm</documentation>
9
9
 
@@ -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.141.0
27
+ * @version 1.142.0
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.141.0
50
+ * @version 1.142.0
51
51
  * @extends sap.ui.core.Element
52
52
  * @constructor
53
53
  * @public
@@ -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
- AnalyticMap.DefaultRegionColor = values?values["_sap_ui_vbm_shared_ChoroplethRegionBG"] : "rgb(213,218,221)";
122
- AnalyticMap.DefaultRegionColorBorder = values?values["_sap_ui_vbm_shared_ChoroplethRegionBorder"] : "rgb(255,255,255)";
123
- AnalyticMap.AltBorderColor = values?values["_sap_ui_vbm_shared_ChartDataPointBorderHoverSelectedColor"] : "#676767";
124
- nonSelectOpacity = values?values["_sap_ui_vbm_shared_ChartDataPointNotSelectedBackgroundOpacity"] : "0.6";
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
 
@@ -992,8 +993,9 @@ sap.ui.define([
992
993
  "_sap_ui_vbm_shared_ChoroplethRegionBG",
993
994
  "_sap_ui_vbm_shared_ChoroplethRegionBorder"
994
995
  ] });
995
- sColC = AnalyticMap.DefaultRegionColor = oColValues? oColValues["_sap_ui_vbm_shared_ChoroplethRegionBG"] : AnalyticMap.DefaultRegionColor;
996
- sColCB = AnalyticMap.DefaultRegionColorBorder = oColValues? oColValues["_sap_ui_vbm_shared_ChoroplethRegionBorder"] : AnalyticMap.DefaultRegionColorBorder;
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);
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  *
24
24
  * @public
25
25
  * @author SAP SE
26
- * @version 1.141.0
26
+ * @version 1.142.0
27
27
  * @extends sap.ui.core.Control
28
28
  * @alias sap.ui.vbm.Viewport
29
29
  */
@@ -341,10 +341,11 @@ sap.ui.define([
341
341
  "_sap_ui_vbm_shared_ChartGood",
342
342
  "_sap_ui_vbm_shared_ChartNeutral"] });
343
343
 
344
- VoBase.prototype.DefaultColorBad = colorParams? colorParams["_sap_ui_vbm_shared_ChartBad"] : "rgb(211, 32, 48)";
345
- VoBase.prototype.DefaultColorCritical = colorParams? colorParams["_sap_ui_vbm_shared_ChartCritical"] : "rgb(225, 123, 36)";
346
- VoBase.prototype.DefaultColorGood = colorParams? colorParams["_sap_ui_vbm_shared_ChartGood"] : "rgb(97, 166, 86)";
347
- VoBase.prototype.DefaultColorNeutral = colorParams? colorParams["_sap_ui_vbm_shared_ChartNeutral"] : "rgb(132, 143, 148)";
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.141.0
25
+ * @version 1.142.0
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.141.0
86
+ * @version 1.142.0
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 */ {
@@ -29,7 +29,7 @@ sap.ui.define([
29
29
  *
30
30
  * @private
31
31
  * @author SAP SE
32
- * @version 1.141.0
32
+ * @version 1.142.0
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.141.0
380
+ * @version 1.142.0
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.141.0
35
+ * @version 1.142.0
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 */ {
@@ -39,7 +39,7 @@ sap.ui.define([
39
39
  *
40
40
  * @private
41
41
  * @author SAP SE
42
- * @version 1.141.0
42
+ * @version 1.142.0
43
43
  * @alias sap.ui.vbm.adapter3d.RectangleTracker
44
44
  */
45
45
  var RectangleTracker = BaseObject.extend("sap.ui.vbm.adapter3d.RectangleTracker", /** @lends sap.ui.vbm.adapter3d.RectangleTracker.prototype */ {
@@ -55,9 +55,11 @@ sap.ui.define([
55
55
  this._selected = new Set();
56
56
  this._renderer = this._renderer;
57
57
  this.init();
58
- var helper = new THREE.CameraHelper(this._camera);
59
- helper.geometry.setDrawRange(0, 0);
60
- this._addToScene(helper, this._scene, true, 1);
58
+ if (!this._adapter._cameraHelper) {
59
+ this._adapter._cameraHelper = new THREE.CameraHelper(this._camera);
60
+ this._adapter._cameraHelper.geometry.setDrawRange(0, 0);
61
+ this._addToScene(this._adapter._cameraHelper, this._scene, true, 1);
62
+ }
61
63
  this._snapBox = new THREE.BoxHelper(undefined, 0x00ffff);
62
64
  // invisible, layer #1 (disable hit test)
63
65
  this._addToScene(this._snapBox, this._scene, false, 1);
@@ -153,80 +155,12 @@ sap.ui.define([
153
155
  }
154
156
  this._updateController(true);
155
157
  this.onSelectStart(event);
156
- var that = this;
157
158
  event.cursor = event.cursor || this._getXY(event);
158
159
  this._mouseDown = true;
159
160
  var rect = this._viewport.getDomRef().getBoundingClientRect();
160
161
  startPoint.x = (event.cursor.x / rect.width) * 2 - 1;
161
162
  startPoint.y = -(event.cursor.y / rect.height) * 2 + 1;
162
- var dataMap = new Map();
163
- var dataType;
164
- var keyAlias;
165
- if (!event.ctrlKey) {
166
- this._selected.forEach(function (item) {
167
- if (item.type != 'InstancedMesh' || item.type != 'PlaneGeometry') {
168
- var obj = {};
169
- if (item._sapInstance != undefined) {
170
- var val = item._sapInstance;
171
- item._sapInstance["VB:s"] = "false";
172
- that._adapter._sceneBuilder.updateHotInstance(val);
173
- dataType = item._sapInstance.voGroup.datasource; // VO group data source linked to a DataType by name
174
- keyAlias = that._adapter._parser.getAttributeAlias(dataType, item._sapInstance.voGroup.keyAttributeName);
175
- obj[keyAlias] = item._sapInstance.id;
176
- obj["VB:s"] = "false";
177
- } else if (item.userData.name == "ColladaBounds") {
178
- if (item.userData._sapInstance["VB:s"] == "true") {
179
- var instance = item.userData._sapInstance;
180
- var selectionChanges = that._adapter._changeSelection(instance, "toggle", false);
181
- that._adapter._sceneBuilder.updateSelection(selectionChanges.selected, selectionChanges.deselected);
182
- dataType = item.userData._sapInstance.voGroup.datasource; // VO group data source linked to a DataType by name
183
- keyAlias = that._adapter._parser.getAttributeAlias(dataType, item.userData._sapInstance.voGroup.keyAttributeName);
184
- obj[keyAlias] = item.userData.id;
185
- obj["VB:s"] = "false";
186
- }
187
- }
188
-
189
- var existingData = dataMap.get(dataType);
190
- if (existingData != undefined ) {
191
- // Check if there's already an entry for this dataType
192
- var existingEntry = existingData.find(function (entry) {
193
- return entry.name === dataType;
194
- });
195
-
196
- if (existingEntry) {
197
- // If an entry exists for this dataType, push the new object to its E array if it's not already present
198
- var existingObject = existingEntry.E.find(function (e) {
199
- if (item._sapInstance != undefined)
200
- return e[keyAlias] === item._sapInstance.id
201
- else
202
- return e[keyAlias] === item.userData.id;
203
- });
204
- if (!existingObject && JSON.stringify(obj) !== '{}' ) {
205
- // If the object doesn't exist, push it to the E array
206
- existingEntry.E.push(obj);
207
- }
208
- }
209
- } else {
210
- // If no data exists for this dataType, create a new array and add the object
211
- dataMap.set(dataType, [{
212
- name: dataType,
213
- E: [obj]
214
- }]);
215
- }
216
- }
217
- });
218
-
219
- if (dataMap != undefined) {
220
- var payload = that._constructPayload(dataMap);
221
- if (payload.Data.Merge.N.length > 0) {
222
- this._adapter.fireSubmit({
223
- data: JSON.stringify(payload)
224
- });
225
- }
226
- }
227
- }
228
-
229
- this._selected.clear();
163
+ this._previousSelected = new Set(this._selected);
230
164
  };
231
165
 
232
166
  RectangleTracker.prototype._onPointerMove = function (event) {
@@ -242,102 +176,132 @@ sap.ui.define([
242
176
  // this._cameraControls.enableRotate = false;
243
177
  // }
244
178
  }
245
- RectangleTracker.prototype._onPointerUp = function (event) {
246
- this._updateController(true);
247
- if (!this._mouseDown) {
248
- var that = this;
249
- event.cursor = event.cursor || this._getXY(event);
250
- var rect = this._viewport.getDomRef().getBoundingClientRect();
251
- endPoint.x = (event.cursor.x / rect.width) * 2 - 1;
252
- endPoint.y = -(event.cursor.y / rect.height) * 2 + 1;
253
- endPoint.z = 0.5
254
- var isSelected = this.selecting(_frustum);
255
- var dataMap = new Map();
256
- var dataType;
257
- var keyAlias;
258
- var obj = {};
259
- if (isSelected.length > 0) {
260
- for (var i = 0; i < isSelected.length; i++) {
261
- this._selected.add(isSelected[i]);
179
+ RectangleTracker.prototype.buildEntry = function (item, selected, items) {
180
+ let dataType, keyAlias;
181
+ let obj = {};
182
+
183
+ if (item._sapInstance != undefined) {
184
+ const val = item._sapInstance;
185
+ item._sapInstance["VB:s"] = selected ? "true" : "false";
186
+ // maybe updateHotInstance only for selected?
187
+ this._adapter._sceneBuilder.updateHotInstance(val);
188
+ dataType = item._sapInstance.voGroup.datasource;
189
+ keyAlias = this._adapter._parser.getAttributeAlias(dataType, item._sapInstance.voGroup.keyAttributeName);
190
+ obj[keyAlias] = item._sapInstance.id;
191
+ obj["VB:s"] = selected ? "true" : "false";
192
+ } else if (item.userData.name === "ColladaBounds") {
193
+ if (selected === true) {
194
+ var id = item.userData.id;
195
+ var meshCount = item.userData.count;
196
+ var count = 0;
197
+ items.forEach(function (itemA) {
198
+ if (itemA.userData.id == id)
199
+ count++;
200
+ });
201
+ if (count == meshCount) {
202
+ var instance = item.userData._sapInstance;
203
+ var selectionChanges = this._adapter._changeSelection(instance, "select", false);
204
+ this._adapter._sceneBuilder.updateSelection(selectionChanges.selected, selectionChanges.deselected);
205
+ dataType = item.userData._sapInstance.voGroup.datasource; // VO group data source linked to a DataType by name
206
+ keyAlias = this._adapter._parser.getAttributeAlias(dataType, item.userData._sapInstance.voGroup.keyAttributeName);
207
+ obj[keyAlias] = item.userData.id;
208
+ obj["VB:s"] = "true";
262
209
  }
263
- }
264
- this._selected.forEach(function (item) {
265
- obj = {};
266
- if (item.type != 'InstancedMesh' || item.type != 'PlaneGeometry') {
267
- if (item._sapInstance != undefined) {
268
- var val = item._sapInstance;
269
- item._sapInstance["VB:s"] = "true";
270
- that._adapter._sceneBuilder.updateHotInstance(val);
271
- dataType = item._sapInstance.voGroup.datasource; // VO group data source linked to a DataType by name
272
- keyAlias = that._adapter._parser.getAttributeAlias(dataType, item._sapInstance.voGroup.keyAttributeName);
273
- obj[keyAlias] = item._sapInstance.id;
274
- obj["VB:s"] = "true";
275
- // that._adapter._handleHover(val);
276
- } else if (item.userData.name == "ColladaBounds") {
277
- var id = item.userData.id;
278
- var meshCount = item.userData.count;
279
- var count = 0;
280
- that._selected.forEach(function (itemA) {
281
- if (itemA.userData.id == id)
282
- count++;
283
- });
284
- if (count == meshCount) {
285
- var instance = item.userData._sapInstance;
286
- var selectionChanges = that._adapter._changeSelection(instance, "select", false);
287
- that._adapter._sceneBuilder.updateSelection(selectionChanges.selected, selectionChanges.deselected);
288
- dataType = item.userData._sapInstance.voGroup.datasource; // VO group data source linked to a DataType by name
289
- keyAlias = that._adapter._parser.getAttributeAlias(dataType, item.userData._sapInstance.voGroup.keyAttributeName);
290
- obj[keyAlias] = item.userData.id;
291
- obj["VB:s"] = "true";
292
- }
293
- }
294
-
295
-
296
- var existingData = dataMap.get(dataType);
297
- if (existingData != undefined) {
298
- // Check if there's already an entry for this dataType
299
- var existingEntry = existingData.find(function (entry) {
300
- return entry.name === dataType;
301
- });
302
- if (existingEntry) {
303
- // If an entry exists for this dataType, push the new object to its E array if it's not already present
304
- var existingObject = existingEntry.E.find(function (e) {
305
- if (item._sapInstance != undefined)
306
- return e[keyAlias] === item._sapInstance.id
307
- else
308
- return e[keyAlias] === item.userData.id;
309
- });
310
- if (!existingObject && JSON.stringify(obj) !== '{}') {
311
- // If the object doesn't exist, push it to the E array
312
- existingEntry.E.push(obj);
313
- }
314
- }
315
- } else {
316
- // If no data exists for this dataType, create a new array and add the object
317
- dataMap.set(dataType, [{
318
- name: dataType,
319
- E: [obj]
320
- }]);
321
- }
322
-
210
+ } else {
211
+ if (item.userData._sapInstance["VB:s"] == "true") {
212
+ var instance = item.userData._sapInstance;
213
+ var selectionChanges = this._adapter._changeSelection(instance, "toggle", false);
214
+ this._adapter._sceneBuilder.updateSelection(selectionChanges.selected, selectionChanges.deselected);
215
+ // your ColladaBounds logic with selected/deselected
216
+ dataType = item.userData._sapInstance.voGroup.datasource;
217
+ keyAlias = this._adapter._parser.getAttributeAlias(dataType, item.userData._sapInstance.voGroup.keyAttributeName);
218
+ obj[keyAlias] = item.userData.id;
219
+ obj["VB:s"] = selected ? "true" : "false";
323
220
  }
324
- });
221
+ }
222
+ }
223
+
224
+ return { dataType, keyAlias, obj };
225
+ };
226
+
227
+ RectangleTracker.prototype.addToDataMap = function (dataMap, dataType, obj, keyAlias, item) {
228
+ if (!dataType || !obj) return;
229
+ const existingData = dataMap.get(dataType);
230
+ if (existingData) {
231
+ const existingEntry = existingData.find(entry => entry.name === dataType);
232
+ if (existingEntry) {
233
+ const existingObject = existingEntry.E.find(e => {
234
+ if (item._sapInstance != undefined)
235
+ return e[keyAlias] === item._sapInstance.id;
236
+ else
237
+ return e[keyAlias] === item.userData.id;
238
+ });
239
+ if (!existingObject && JSON.stringify(obj) !== '{}') existingEntry.E.push(obj);
240
+ }
241
+ } else {
242
+ dataMap.set(dataType, [{ name: dataType, E: [obj] }]);
243
+ }
244
+ };
245
+
246
+ RectangleTracker.prototype._onPointerUp = function (event) {
247
+ this._updateController(true);
248
+ if (this._mouseDown) return;
249
+
250
+ event.cursor = event.cursor || this._getXY(event);
251
+ var rect = this._viewport.getDomRef().getBoundingClientRect();
252
+ endPoint.x = (event.cursor.x / rect.width) * 2 - 1;
253
+ endPoint.y = -(event.cursor.y / rect.height) * 2 + 1;
254
+ endPoint.z = 0.5
325
255
 
256
+ const inside = this.selecting(_frustum); // all objects in rectangle
257
+ if (inside.length === 0) {
258
+ this._mouseDown = false;
259
+ this._dom.style.cursor = this._hovered ? "pointer" : "auto";
260
+ this.onSelectOver();
261
+ return;
326
262
  }
327
- if (dataMap != undefined) {
328
- var payload = that._constructPayload(dataMap);
263
+ // build new selection set
264
+ const newSelected = new Set(inside);
265
+
266
+ // deselect items not in rectangle anymore
267
+ var deselected = [...this._previousSelected].filter(i => !newSelected.has(i));
268
+
269
+ // select items newly in rectangle
270
+ //const newlySelected = [...newSelected].filter(i => !this._previousSelected.has(i));
271
+
272
+ // update your internal set
273
+ this._selected.clear();
274
+ newSelected.forEach(i => this._selected.add(i));
275
+
276
+ // build a single dataMap for deselection + selection
277
+ const dataMap = new Map();
278
+
279
+ // handle deselection
280
+ deselected.forEach(item => {
281
+ const { dataType, keyAlias, obj } = this.buildEntry(item, false, deselected); // VB:s false
282
+ this.addToDataMap(dataMap, dataType, obj, keyAlias, item);
283
+ });
284
+
285
+ // handle selection
286
+ inside.forEach(item => {
287
+ const { dataType, keyAlias, obj } = this.buildEntry(item, true, inside); // VB:s true
288
+ this.addToDataMap(dataMap, dataType, obj, keyAlias, item);
289
+ });
290
+
291
+ if (dataMap.size > 0) {
292
+ const payload = this._constructPayload(dataMap);
329
293
  if (payload.Data.Merge.N.length > 0) {
330
- this._adapter.fireSubmit({
331
- data: JSON.stringify(payload)
332
- });
294
+ this._adapter.fireSubmit({ data: JSON.stringify(payload) });
333
295
  }
334
296
  }
297
+
335
298
  this._mouseDown = false;
336
299
  this._dom.style.cursor = this._hovered ? "pointer" : "auto";
337
300
  this._updateController(true);
338
301
  this.onSelectOver();
339
302
  };
340
303
 
304
+
341
305
  RectangleTracker.prototype._constructPayload = function (dataMap) {
342
306
  var payload = {
343
307
  version: "2.0",
@@ -464,39 +428,51 @@ sap.ui.define([
464
428
  var minY = Math.min(startPoint.y, endPoint.y);
465
429
  var maxY = Math.max(startPoint.y, endPoint.y);
466
430
 
431
+
432
+ _vecNear.setFromMatrixPosition(this._camera.matrixWorld);
467
433
  // Define corners in NDC (normalized device coordinates)
468
434
  _vecTopLeft.set(minX, maxY, 0);
469
435
  _vecTopRight.set(maxX, maxY, 0);
470
436
  _vecDownRight.set(maxX, minY, 0);
471
437
  _vecDownLeft.set(minX, minY, 0);
472
-
473
- // Camera position
474
- _vecNear.setFromMatrixPosition(this._camera.matrixWorld);
475
-
438
+
476
439
  _vecTopLeft.unproject(this._camera);
477
440
  _vecTopRight.unproject(this._camera);
478
441
  _vecDownRight.unproject(this._camera);
479
442
  _vecDownLeft.unproject(this._camera);
480
443
 
481
- // Far points (deep into the scene)
482
- _vectemp1.copy(_vecTopLeft).sub(_vecNear).normalize().multiplyScalar(this.deep).add(_vecNear);
483
- _vectemp2.copy(_vecTopRight).sub(_vecNear).normalize().multiplyScalar(this.deep).add(_vecNear);
484
- _vectemp3.copy(_vecDownRight).sub(_vecNear).normalize().multiplyScalar(this.deep).add(_vecNear);
485
- _vectemp4.copy(_vecDownLeft).sub(_vecNear).normalize().multiplyScalar(this.deep).add(_vecNear);
444
+ _vectemp1.copy(_vecTopLeft).sub(_vecNear);
445
+ _vectemp2.copy(_vecTopRight).sub(_vecNear);
446
+ _vectemp3.copy(_vecDownRight).sub(_vecNear);
447
+ _vectemp4.copy(_vecDownLeft).sub(_vecNear)
448
+
449
+ _vectemp1.normalize();
450
+ _vectemp2.normalize();
451
+ _vectemp3.normalize();
452
+ _vectemp4.normalize();
453
+
454
+
455
+ _vectemp1.multiplyScalar(this.deep);
456
+ _vectemp2.multiplyScalar(this.deep);
457
+ _vectemp3.multiplyScalar(this.deep);
458
+ _vectemp4.multiplyScalar(this.deep);
459
+ _vectemp1.sub(_vecNear);
460
+ _vectemp2.sub(_vecNear);
461
+ _vectemp3.sub(_vecNear);
462
+ _vectemp4.sub(_vecNear);
486
463
 
487
464
  var planes = _frustum.planes;
488
465
 
489
- // Build planes around the selection frustum
490
- planes[0].setFromCoplanarPoints(_vecNear, _vecTopLeft, _vecTopRight); // top
491
- planes[1].setFromCoplanarPoints(_vecNear, _vecTopRight, _vecDownRight); // right
492
- planes[2].setFromCoplanarPoints(_vecNear, _vecDownRight, _vecDownLeft); // bottom
493
- planes[3].setFromCoplanarPoints(_vecNear, _vecDownLeft, _vecTopLeft); // left
494
- planes[4].setFromCoplanarPoints(_vecTopRight, _vecDownRight, _vecDownLeft); // near plane
495
- planes[5].setFromCoplanarPoints(_vectemp3, _vectemp2, _vectemp1); // far plane
466
+ planes[0].setFromCoplanarPoints(_vecNear, _vecTopLeft, _vecTopRight);
467
+ planes[1].setFromCoplanarPoints(_vecNear, _vecTopRight, _vecDownRight);
468
+ planes[2].setFromCoplanarPoints(_vecDownRight, _vecDownLeft, _vecNear);
469
+ planes[3].setFromCoplanarPoints(_vecDownLeft, _vecTopLeft, _vecNear);
470
+ planes[4].setFromCoplanarPoints(_vecTopRight, _vecDownRight, _vecDownLeft);
471
+ planes[5].setFromCoplanarPoints(_vectemp3, _vectemp2, _vectemp1);
496
472
  planes[5].normal.multiplyScalar(-1);
497
473
  }
498
474
 
499
- return _frustum; // ✅ return the frustum so selecting() can use it
475
+
500
476
  };
501
477
 
502
478
  RectangleTracker.prototype.searchChildInFrustum = function (frustum, object) {
@@ -47,7 +47,7 @@ sap.ui.define([
47
47
  *
48
48
  * @private
49
49
  * @author SAP SE
50
- * @version 1.141.0
50
+ * @version 1.142.0
51
51
  * @alias sap.ui.vbm.adapter3d.SceneBuilder
52
52
  */
53
53
  var SceneBuilder = BaseObject.extend("sap.ui.vbm.adapter3d.SceneBuilder", /** @lends sap.ui.vbm.adapter3d.SceneBuilder.prototype */ {
@@ -56,7 +56,7 @@ sap.ui.define([
56
56
  *
57
57
  * @private
58
58
  * @author SAP SE
59
- * @version 1.141.0
59
+ * @version 1.142.0
60
60
  * @alias sap.ui.vbm.adapter3d.VBIJSONParser
61
61
  */
62
62
  var VBIJSONParser = BaseObject.extend("sap.ui.vbm.adapter3d.VBIJSONParser", /** @lends sap.ui.vbm.adapter3d.VBIJSONParser.prototype */ {
@@ -20,7 +20,7 @@ sap.ui.define([
20
20
  * @namespace
21
21
  * @alias sap.ui.vbm
22
22
  * @author SAP SE
23
- * @version 1.141.0
23
+ * @version 1.142.0
24
24
  * @public
25
25
  */
26
26
 
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  "sap.ui.vbm.ClusterBase", "sap.ui.vbm.ClusterTree", "sap.ui.vbm.ClusterGrid", "sap.ui.vbm.ClusterDistance", "sap.ui.vbm.Heatmap",
47
47
  "sap.ui.vbm.HeatPoint", "sap.ui.vbm.ClusterContainer", "sap.ui.vbm.Adapter", "sap.ui.vbm.Adapter3D"
48
48
  ],
49
- version: "1.141.0"
49
+ version: "1.142.0"
50
50
  });
51
51
 
52
52
  sap.ui.loader.config({
@@ -12,7 +12,7 @@ sap.ui.define([
12
12
  *
13
13
  * @private
14
14
  * @author SAP SE
15
- * @version 1.141.0
15
+ * @version 1.142.0
16
16
  * @alias sap.ui.vbm.vector.PayloadGenerator
17
17
  */
18
18
  var adapter = {};
@@ -12,7 +12,7 @@ sap.ui.define([
12
12
  *
13
13
  * @private
14
14
  * @author SAP SE
15
- * @version 1.141.0
15
+ * @version 1.142.0
16
16
  * @alias sap.ui.vbm.vector.RectangularSelection
17
17
  */
18
18
 
@@ -742,12 +742,27 @@ sap.ui.define([
742
742
  // code block
743
743
  }
744
744
  }
745
-
746
745
  }
747
746
  }
748
747
  }
749
748
 
750
-
749
+ featureCollection = Object.values(
750
+ featureCollection.reduce((acc, f) => {
751
+ const key = f.properties?.Key;
752
+ if (!key) return acc; // skip if no key
753
+
754
+ if (!acc[key]) {
755
+ acc[key] = { ...f };
756
+ } else {
757
+ // Merge properties if duplicate found
758
+ acc[key].properties = {
759
+ ...acc[key].properties,
760
+ ...f.properties
761
+ };
762
+ }
763
+ return acc;
764
+ }, {})
765
+ );
751
766
  if (obj.SAPVB.Data.Remove) {
752
767
 
753
768
  let del = obj.SAPVB.Data.Remove;
@@ -40,7 +40,6 @@ sap.ui.define([
40
40
  el.id = '__mapmarker' + spotid++;
41
41
  el.style.backgroundImage = `url(${base64decoded})`;
42
42
  el.style.backgroundSize = 'cover';
43
- el.style.pointerEvents = 'none';
44
43
  el.style.display = 'inline-block';
45
44
  el.style.transform = 'translate(-50%, -100%)';
46
45