@sapui5/sap.ui.vbm 1.107.0 → 1.109.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.107.0",
3
+ "version": "1.109.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.107.0</version>
6
+ <version>1.109.0</version>
7
7
 
8
8
  <documentation>SAP UI library: sap.ui.vbm</documentation>
9
9
 
@@ -22,7 +22,7 @@ sap.ui.define([
22
22
  * @param {string} [sId] id for the new control, generated automatically if no id is given
23
23
  * @param {object} [mSettings] initial settings for the new object
24
24
  * @author SAP SE
25
- * @version 1.107.0
25
+ * @version 1.109.0
26
26
  * @extends sap.ui.core.Element
27
27
  * @constructor
28
28
  * @public
@@ -45,7 +45,7 @@ sap.ui.define([
45
45
  * @param {string} [sId] id for the new control, generated automatically if no id is given
46
46
  * @param {object} [mSettings] initial settings for the new object
47
47
  * @author SAP SE
48
- * @version 1.107.0
48
+ * @version 1.109.0
49
49
  * @extends sap.ui.core.Element
50
50
  * @constructor
51
51
  * @public
@@ -293,6 +293,9 @@ sap.ui.define([
293
293
  this._disconnectViewport();
294
294
  this._viewport = associatedViewport;
295
295
  this._connectViewport();
296
+ var orbitInstance = this._viewport.getOrbitControl();
297
+ orbitInstance.setConfig(this._context.config);
298
+ orbitInstance.setUtilities(Utilities);
296
299
  }
297
300
  };
298
301
 
@@ -751,11 +754,12 @@ sap.ui.define([
751
754
  };
752
755
 
753
756
  Adapter3D.prototype._genericEventHandler = function(name, event) {
754
- // special handling section for hardcoded keys
755
- // 'h' button pressed -> change camera to 'home' (initial) view
756
- if (event.keyCode == 72) {
757
+
758
+ var homeButtonKey = Utilities.parseKeyboardShortcut(this._context.config.has("HOME_VIEW") ? this._context.config.get("HOME_VIEW") : "72");
759
+
760
+ if (Utilities.matchKeyboardShortcut(event, homeButtonKey)) {
757
761
  this._viewport.applyCameraHome(false); // no fly-to animation needed here
758
- return;
762
+ return;
759
763
  }
760
764
 
761
765
  var instance = event.instance;
@@ -9,8 +9,9 @@ sap.ui.define([
9
9
  "sap/ui/core/theming/Parameters",
10
10
  "jquery.sap.global",
11
11
  "sap/base/Log",
12
- "./library"
13
- ], function(GeoMap, VoBase, Parameters, jQuery, Log, library) {
12
+ "./library",
13
+ "./AnalyticMapRenderer"
14
+ ], function(GeoMap, VoBase, Parameters, jQuery, Log, library, AnalyticMapRenderer) {
14
15
  "use strict";
15
16
 
16
17
  /**
@@ -92,7 +93,9 @@ sap.ui.define([
92
93
  */
93
94
  regionDeselect: {}
94
95
  }
95
- }
96
+ },
97
+
98
+ renderer: AnalyticMapRenderer
96
99
  });
97
100
 
98
101
  // ...........................................................................//
@@ -11,7 +11,9 @@ sap.ui.define([
11
11
  * @class MapRenderer renderer.
12
12
  * @static
13
13
  */
14
- var AnalyticMapRenderer = {};
14
+ var AnalyticMapRenderer = {
15
+ apiVersion: 2 // Semantic Rendering
16
+ };
15
17
 
16
18
  /**
17
19
  * Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
@@ -70,7 +70,9 @@ sap.ui.define([
70
70
  }
71
71
 
72
72
  }
73
- }
73
+ },
74
+
75
+ renderer: ClusterRenderer
74
76
  });
75
77
 
76
78
  // ...........................................................................//
@@ -11,7 +11,9 @@ sap.ui.define([
11
11
  * @class Cluster renderer.
12
12
  * @static
13
13
  */
14
- var ClusterRenderer = {};
14
+ var ClusterRenderer = {
15
+ apiVersion: 2 // Semantic Rendering
16
+ };
15
17
 
16
18
  /**
17
19
  * Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
@@ -21,15 +23,12 @@ sap.ui.define([
21
23
  */
22
24
  ClusterRenderer.render = function(oRm, oControl) {
23
25
  // write the HTML into the render manager
24
- oRm.write("<div align='center'");
25
- oRm.writeAttribute("role", sap.ui.core.AccessibleRole.Presentation);
26
- oRm.writeAttribute("tabindex", "-1");
27
- oRm.writeControlData(oControl);
28
- oRm.addClass("sapUiVbicluster-main");
29
- oRm.writeClasses(oControl);
30
-
31
- oRm.writeStyles();
32
- oRm.write(">"); // span element
26
+ oRm.openStart("div", oControl);
27
+ oRm.attr("align", "center");
28
+ oRm.attr("role", sap.ui.core.AccessibleRole.Presentation);
29
+ oRm.attr("tabindex", "-1");
30
+ oRm.class("sapUiVbicluster-main");
31
+ oRm.openEnd();
33
32
 
34
33
  var Id1 = oControl.getId() + "-" + "backgroundcircle";
35
34
  var Id2 = Id1 + "-" + "innercircle";
@@ -55,58 +54,88 @@ sap.ui.define([
55
54
  }
56
55
  var classOuter, classInner, classTextbox, classIcon;
57
56
  if (type == sap.ui.vbm.SemanticType.Error) {
58
- classOuter = "class = 'sapUiVbicluster-backgroundcircle sapUiVbicluster-border-error'";
59
- classInner = "class = 'sapUiVbicluster-innercircle sapUiVbicluster-background-error'";
60
- classIcon = "class = 'sapUiVbicluster-icon sapUiVbicluster-iconLight'";
61
- classTextbox = "class = 'sapUiVbicluster-textbox sapUiVbicluster-textbox-error'";
57
+ classOuter = "sapUiVbicluster-backgroundcircle sapUiVbicluster-border-error";
58
+ classInner = "sapUiVbicluster-innercircle sapUiVbicluster-background-error";
59
+ classIcon = "sapUiVbicluster-icon sapUiVbicluster-iconLight";
60
+ classTextbox = "sapUiVbicluster-textbox sapUiVbicluster-textbox-error";
62
61
  } else if (type == sap.ui.vbm.SemanticType.Warning) {
63
- classOuter = "class = 'sapUiVbicluster-backgroundcircle sapUiVbicluster-border-warning'";
64
- classInner = "class = 'sapUiVbicluster-innercircle sapUiVbicluster-background-warning'";
65
- classIcon = "class = 'sapUiVbicluster-icon sapUiVbicluster-iconLight'";
66
- classTextbox = "class = 'sapUiVbicluster-textbox sapUiVbicluster-textbox-warning'";
62
+ classOuter = "sapUiVbicluster-backgroundcircle sapUiVbicluster-border-warning";
63
+ classInner = "sapUiVbicluster-innercircle sapUiVbicluster-background-warning";
64
+ classIcon = "sapUiVbicluster-icon sapUiVbicluster-iconLight";
65
+ classTextbox = "sapUiVbicluster-textbox sapUiVbicluster-textbox-warning";
67
66
  } else if (type == sap.ui.vbm.SemanticType.Success) {
68
- classOuter = "class = 'sapUiVbicluster-backgroundcircle sapUiVbicluster-border-success'";
69
- classInner = "class = 'sapUiVbicluster-innercircle sapUiVbicluster-background-success sapUiVbicluster-inner-light'";
70
- classIcon = "class = 'sapUiVbicluster-icon sapUiVbicluster-iconSuccess'";
71
- classTextbox = "class = 'sapUiVbicluster-textbox sapUiVbicluster-textbox-success'";
67
+ classOuter = "sapUiVbicluster-backgroundcircle sapUiVbicluster-border-success";
68
+ classInner = "sapUiVbicluster-innercircle sapUiVbicluster-background-success sapUiVbicluster-inner-light";
69
+ classIcon = "sapUiVbicluster-icon sapUiVbicluster-iconSuccess";
70
+ classTextbox = "sapUiVbicluster-textbox sapUiVbicluster-textbox-success";
72
71
  } else if (type == sap.ui.vbm.SemanticType.None && col) {
73
72
  // not type but color
74
- classOuter = "class = 'sapUiVbicluster-backgroundcircle' style = 'border-color: " + col + "'";
75
- classInner = "class = 'sapUiVbicluster-innercircle sapUiVbicluster-inner-light' style = 'border-color: " + col + "'";
76
- classIcon = "class = 'sapUiVbicluster-icon' style = 'color: " + col + "'";
77
- classTextbox = "class = 'sapUiVbicluster-textbox' style = 'border-color: " + col + "'";
73
+ classOuter = "sapUiVbicluster-backgroundcircle";
74
+ classInner = "sapUiVbicluster-innercircle sapUiVbicluster-inner-light";
75
+ classIcon = "sapUiVbicluster-icon";
76
+ classTextbox = "sapUiVbicluster-textbox";
78
77
  } else {
79
- classOuter = "class = 'sapUiVbicluster-backgroundcircle sapUiVbicluster-border-default'";
80
- classInner = "class = 'sapUiVbicluster-innercircle sapUiVbicluster-background-default sapUiVbicluster-inner-light'";
81
- classIcon = "class = 'sapUiVbicluster-icon sapUiVbicluster-iconDefault'";
82
- classTextbox = "class = 'sapUiVbicluster-textbox sapUiVbicluster-textbox-default'";
78
+ classOuter = "sapUiVbicluster-backgroundcircle sapUiVbicluster-border-default";
79
+ classInner = "sapUiVbicluster-innercircle sapUiVbicluster-background-default sapUiVbicluster-inner-light";
80
+ classIcon = "sapUiVbicluster-icon sapUiVbicluster-iconDefault";
81
+ classTextbox = "sapUiVbicluster-textbox sapUiVbicluster-textbox-default";
83
82
  }
84
83
 
85
- var ariaRolePresentation = "role = '" + sap.ui.core.AccessibleRole.Presentation + "'";
86
- var ariaRoleImg = "role = '" + sap.ui.core.AccessibleRole.Img + "'";
87
- var ariaRoleDescription = "role = '" + sap.ui.core.AccessibleRole.Description + "'";
84
+ var ariaRolePresentation = sap.ui.core.AccessibleRole.Presentation;
85
+ var ariaRoleImg = sap.ui.core.AccessibleRole.Img;
86
+ var ariaRoleDescription = sap.ui.core.AccessibleRole.Description;
87
+
88
+ oRm.openStart("div", Id1);
89
+ oRm.class(classOuter);
90
+
91
+ if (type == sap.ui.vbm.SemanticType.None && col) {
92
+ oRm.style("border-color", col)
93
+ }
94
+ oRm.attr("role", ariaRolePresentation);
95
+ oRm.openEnd();
96
+
97
+ oRm.openStart("div", Id2);
98
+ oRm.class(classInner);
99
+ if (type == sap.ui.vbm.SemanticType.None && col) {
100
+ oRm.style("border-color", col)
101
+ }
102
+ oRm.attr("role", ariaRolePresentation);
103
+ oRm.openEnd();
104
+
105
+
88
106
 
89
- oRm.write("<div id= " + Id1 + " " + classOuter + " " + ariaRolePresentation + ">");
90
- oRm.write("<div id= " + Id2 + " " + classInner + " " + ariaRolePresentation + ">");
91
107
 
92
108
  if (icon) {
93
109
  var IdIcon = oControl.getId() + "-" + "icon";
94
- oRm.write("<span id= " + IdIcon + " " + classIcon + " " + ariaRoleImg + ">");
95
- oRm.writeEscaped(icon);
96
- oRm.write("</span>");
110
+ oRm.openStart("span", IdIcon);
111
+ oRm.class(classIcon);
112
+ if (type == sap.ui.vbm.SemanticType.None && col) {
113
+ oRm.style("color", col)
114
+ }
115
+ oRm.attr("role", ariaRoleImg);
116
+ oRm.openEnd();
117
+ oRm.text(icon);
118
+ oRm.close("span");
97
119
  }
98
120
 
99
- oRm.write("</div>"); // end of cluster-innercircle
121
+ oRm.close("div"); // end of cluster-innercircle
100
122
  if ((oControl.getText())) {
101
123
  var IdTextbox = oControl.getId() + "-" + "textbox";
102
- oRm.write("<div id= " + IdTextbox + " " + classTextbox + " " + ariaRoleDescription +">");
103
- oRm.write("<div>");
104
- oRm.writeEscaped(oControl.getText());
105
- oRm.write("</div>");
106
- oRm.write("</div>");
124
+ oRm.openStart("div", IdTextbox);
125
+ oRm.class(classTextbox);
126
+ if (type == sap.ui.vbm.SemanticType.None && col) {
127
+ oRm.style("border-color", col);
128
+ }
129
+ oRm.attr("role", ariaRoleDescription);
130
+ oRm.openEnd();
131
+ oRm.openStart("div");
132
+ oRm.openEnd();
133
+ oRm.text(oControl.getText());
134
+ oRm.close("div");
135
+ oRm.close("div");
107
136
  }
108
- oRm.write("</div>"); // end of cluster-backgroundcircle
109
- oRm.write("</div>");
137
+ oRm.close("div"); // end of cluster-backgroundcircle
138
+ oRm.close("div");
110
139
 
111
140
  };
112
141
 
@@ -125,7 +125,7 @@ sap.ui.define([
125
125
  defaultValue: null
126
126
  },
127
127
  /**
128
- * @deprecated This property should not longer be used. Its functionality has been replaced by the <code>clusters</code>
128
+ * @deprecated since version 1.31 This property should not longer be used. Its functionality has been replaced by the <code>clusters</code>
129
129
  * aggregation.
130
130
  */
131
131
  clustering: {
@@ -178,7 +178,7 @@ sap.ui.define([
178
178
  singularName: "geoJsonLayer"
179
179
  },
180
180
  /**
181
- * @deprecated This aggregation should not longer be used. Its functionality has been replaced by the more generic<code>geoJsonLayers</code>
181
+ * @deprecated since version 1.31 This aggregation should not longer be used. Its functionality has been replaced by the more generic<code>geoJsonLayers</code>
182
182
  * aggregation.
183
183
  */
184
184
  featureCollections: {
@@ -448,7 +448,9 @@ sap.ui.define([
448
448
  }
449
449
  }
450
450
  }
451
- }
451
+ },
452
+
453
+ renderer: GeoMapRenderer
452
454
  });
453
455
  // /**
454
456
  // * This file defines behavior for the control,
@@ -729,7 +731,7 @@ sap.ui.define([
729
731
  * @param {object} oClustering Cluster Definition object
730
732
  * @returns {sap.ui.vbm.GeoMap} This allows method chaining
731
733
  * @public
732
- * @deprecated This property should not longer be used. Its functionality has been replaced by the <code>clusters</code> aggregation.
734
+ * @deprecated since version 1.31 This property should not longer be used. Its functionality has been replaced by the <code>clusters</code> aggregation.
733
735
  * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel
734
736
  */
735
737
  GeoMap.prototype.setClustering = function(oClustering) {
@@ -10,7 +10,9 @@ sap.ui.define([
10
10
  /*
11
11
  * @class GeoMap renderer. @static
12
12
  */
13
- var GeoMapRenderer = {};
13
+ var GeoMapRenderer = {
14
+ apiVersion: 2 // Semantic Rendering
15
+ };
14
16
 
15
17
  /**
16
18
  * Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  },
58
58
  events: {
59
59
  /**
60
- * @deprecated This event should no longer be used. Click event from Pie and Pies now includes Pie Item index when event occurs.
60
+ * @deprecated since version 1.31 This event should no longer be used. Click event from Pie and Pies now includes Pie Item index when event occurs.
61
61
  */
62
62
  click: {}
63
63
  }
@@ -96,7 +96,7 @@ sap.ui.define([
96
96
  },
97
97
 
98
98
  /**
99
- * @deprecated This property should not longer be used. Its functionality is covered by method <code>load</code>.
99
+ * @deprecated since version 1.31 This property should not longer be used. Its functionality is covered by method <code>load</code>.
100
100
  */
101
101
  config: {
102
102
  type: "object",
@@ -382,7 +382,9 @@ sap.ui.define([
382
382
  }
383
383
  }
384
384
  }
385
- }
385
+ },
386
+
387
+ renderer: VBIRenderer
386
388
  });
387
389
 
388
390
  // ...........................................................................//
@@ -9,7 +9,9 @@ sap.ui.define(function() {
9
9
  * @class VBI renderer.
10
10
  * @static
11
11
  */
12
- var VBIRenderer = {};
12
+ var VBIRenderer = {
13
+ apiVersion: 2 // Semantic Rendering
14
+ };
13
15
 
14
16
  /**
15
17
  * Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
@@ -18,37 +20,32 @@ sap.ui.define(function() {
18
20
  * @param {sap.ui.core.Control} oControl an object representation of the control that should be rendered
19
21
  */
20
22
  VBIRenderer.render = function(oRm, oControl) {
21
- // console.log( "sap.ui.vbm.VBIRenderer.render.....\r\n");
22
23
  var sAriaLabel = oControl.getAriaLabel();
23
24
  var aLabelledBy = oControl.getAriaLabelledBy();
24
25
  var aDescribedBy = oControl.getAriaDescribedBy();
25
26
 
26
27
  // write the HTML into the render manager
27
- oRm.write("<div");
28
- oRm.writeControlData(oControl);
29
- oRm.writeAttribute("role", "Figure");
28
+ oRm.openStart("div", oControl);
29
+ oRm.attr("role", "Figure");
30
+
30
31
 
31
32
  if (sAriaLabel) {
32
- oRm.writeAttributeEscaped("aria-label", sAriaLabel);
33
+ oRm.attr("aria-label", sAriaLabel);
33
34
  }
34
35
 
35
36
  // aria-labelledby references
36
37
  if (aLabelledBy && aLabelledBy.length > 0) {
37
- oRm.writeAttributeEscaped("aria-labelledby", aLabelledBy.join(" "));
38
+ oRm.attr("aria-labelledby", aLabelledBy.join(" "));
38
39
  }
39
40
  // aria-describedby references
40
41
  if (aDescribedBy && aDescribedBy.length > 0) {
41
- oRm.writeAttributeEscaped("aria-describedby", aDescribedBy.join(" "));
42
+ oRm.attr("aria-describedby", aDescribedBy.join(" "));
42
43
  }
43
-
44
- oRm.writeAttribute("tabindex", "0");
45
- oRm.addClass("vbi-main");
46
- oRm.writeClasses(oControl);
47
- oRm.addStyle("width", oControl.getWidth());
48
- oRm.addStyle("height", oControl.getHeight());
49
-
50
- oRm.writeStyles();
51
- oRm.write(">"); // span element
44
+ oRm.attr("tabindex", "0");
45
+ oRm.class("vbi-main");
46
+ oRm.style("width", oControl.getWidth());
47
+ oRm.style("height", oControl.getHeight());
48
+ oRm.openEnd();
52
49
 
53
50
  var id = oControl.getId();
54
51
 
@@ -58,30 +55,40 @@ sap.ui.define(function() {
58
55
  // for IE 11 do the regexp test........................................//
59
56
  if ((navigator.appName == "Microsoft Internet Explorer") || /(trident)\/[\w.]+;.*rv:([\w.]+)/i.test(navigator.userAgent)) {
60
57
  // write the object tag
61
- oRm.write("<object id='VBI" + id + "'" + " data-sap-ui-preserve='" + id + "' CLASSID='CLSID:00100000-2011-0070-2000-FC7214A1CD7B' " + "width='" + oControl.getWidth() + "' " + "height='" + oControl.getHeight() + "' " +
62
-
63
- ">");
64
-
58
+ oRm.openStart("object", "'VBI" + id + "'" + " data-sap-ui-preserve='" + id + "' CLASSID='CLSID:00100000-2011-0070-2000-FC7214A1CD7B'");
59
+ oRm.attr("width", oControl.getWidth());
60
+ oRm.attr("height", oControl.getHeight());
61
+ oRm.openEnd();
65
62
  // set a link to the native installer...............................//
66
- oRm.write("<a href='https://help.sap.com/viewer/product/SAP_VISUAL_BUSINESS_2.1' > Get the Visual Business PlugIn.</a>");
63
+ oRm.openStart("a");
64
+ oRm.attr("href", "https://help.sap.com/viewer/product/SAP_VISUAL_BUSINESS_2.1");
65
+ oRm.openEnd();
66
+ oRm.text("Get the Visual Business PlugIn.");
67
+ oRm.close("a");
67
68
 
68
- oRm.write("</object>");
69
+ oRm.close("object");
69
70
 
70
71
  } else {
71
72
  // write the embed tag
72
- oRm.write("<embed id='VBI" + id + "'" + " data-sap-ui-preserve='" + id + "' type='application/x-visualbusiness' " + "width='" + oControl.getWidth() + "' " + "height='" + oControl.getHeight() + "' " + ">");
73
+ oRm.openStart("write", "'VBI" + id + "'" + " data-sap-ui-preserve='" + id + "' type='application/x-visualbusiness'");
74
+ oRm.attr("width", oControl.getWidth());
75
+ oRm.attr("height", oControl.getHeight());
76
+ oRm.openEnd();
73
77
 
74
78
  }
75
79
  // render the information for using the native plugin
76
80
  }
77
81
  }
78
82
 
79
- oRm.write("<div class='vbi-hidden' role='" + sap.ui.core.AccessibleRole.Presentation + "'>");
80
- this.renderDependants(oRm, oControl.m_renderList);
81
- oRm.write("</div>");
83
+ oRm.openStart("div");
84
+ oRm.class("vbi-hidden");
85
+ oRm.attr("role", sap.ui.core.AccessibleRole.Presentation);
86
+ oRm.openEnd();
87
+ this.renderDependants(oRm, oControl.m_renderList);
88
+ oRm.close("div");
82
89
  oControl.m_renderList = [];
83
90
 
84
- oRm.write("</div>");
91
+ oRm.close("div");
85
92
 
86
93
  // the config is not loaded here any more, due the set config will be.....//
87
94
  // called, then queueing or execution will take place.....................//
@@ -94,9 +101,11 @@ sap.ui.define(function() {
94
101
  // We need to find a better solution because the real problem
95
102
  // is the fact that we fire the container creation event twice.
96
103
  if (!oEntry.control.getDomRef()) {
97
- oRm.write("<div data='" + oEntry.data + "'>");
104
+ oRm.openStart("div");
105
+ oRm.attr("data", oEntry.data);
106
+ oRm.openEnd();
98
107
  oRm.renderControl(oEntry.control);
99
- oRm.write("</div>");
108
+ oRm.close("div");
100
109
  }
101
110
  }
102
111
  };
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  *
24
24
  * @public
25
25
  * @author SAP SE
26
- * @version 1.107.0
26
+ * @version 1.109.0
27
27
  * @extends sap.ui.core.Control
28
28
  * @alias sap.ui.vbm.Viewport
29
29
  */
@@ -81,7 +81,9 @@ sap.ui.define([
81
81
  }
82
82
  }
83
83
  }
84
- }
84
+ },
85
+
86
+ renderer: ViewportRenderer
85
87
  });
86
88
 
87
89
  var EPS = 0.000001;
@@ -182,6 +184,10 @@ sap.ui.define([
182
184
  this._cameraController.update();
183
185
  };
184
186
 
187
+ Viewport.prototype.getOrbitControl = function () {
188
+ return this._cameraController;
189
+ };
190
+
185
191
  Viewport.prototype.exit = function () {
186
192
  if (this._resizeListenerId) {
187
193
  ResizeHandler.deregister(this._resizeListenerId);
@@ -9,20 +9,19 @@ sap.ui.define(function() {
9
9
  * Viewport renderer.
10
10
  * @namespace
11
11
  */
12
- var ViewportRenderer = {};
12
+ var ViewportRenderer = {
13
+ apiVersion: 2 // Semantic Rendering
14
+ };
13
15
 
14
16
  ViewportRenderer.render = function(rm, control) {
15
- rm.write("<div");
16
- rm.writeControlData(control);
17
- rm.writeAttribute("tabindex", 0);
18
- rm.writeAttribute("role", "figure");
19
- rm.addStyle("width", control.getWidth());
20
- rm.addStyle("height", control.getHeight());
21
- rm.writeStyles();
22
- rm.addClass("sapUiVbmViewport");
23
- rm.writeClasses();
24
- rm.write(">");
25
- rm.write("</div>");
17
+ rm.openStart("div", control);
18
+ rm.attr("tabindex", 0);
19
+ rm.attr("role", "figure");
20
+ rm.style("width", control.getWidth())
21
+ rm.style("height", control.getHeight());
22
+ rm.class("sapUiVbmViewport");
23
+ rm.openEnd();
24
+ rm.close("div");
26
25
  };
27
26
 
28
27
  return ViewportRenderer;
@@ -354,7 +354,7 @@ sap.ui.define([
354
354
  var key = (name.indexOf(".") !== -1) ? name.split(".")[1] : name;
355
355
  for (var nJ = 0, len = aVO.length; nJ < len; ++nJ) {
356
356
  // get the control.....................................................//
357
- if (aVO[nJ].sId === key || aVO[nJ].getKey() === key) {
357
+ if (aVO[nJ].getKey() === key) {
358
358
  return aVO[nJ];
359
359
  }
360
360
  }
@@ -83,7 +83,7 @@ sap.ui.define([
83
83
  *
84
84
  * @private
85
85
  * @author SAP SE
86
- * @version 1.107.0
86
+ * @version 1.109.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.107.0
32
+ * @version 1.109.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.107.0
380
+ * @version 1.109.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.107.0
35
+ * @version 1.109.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 */ {
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  *
47
47
  * @private
48
48
  * @author SAP SE
49
- * @version 1.107.0
49
+ * @version 1.109.0
50
50
  * @alias sap.ui.vbm.adapter3d.SceneBuilder
51
51
  */
52
52
  var SceneBuilder = BaseObject.extend("sap.ui.vbm.adapter3d.SceneBuilder", /** @lends sap.ui.vbm.adapter3d.SceneBuilder.prototype */ {
@@ -561,5 +561,140 @@ sap.ui.define([
561
561
  return (layers.mask & ( 1 << channel | 0 ) ) !== 0;
562
562
  };
563
563
 
564
+ Utilities.parseKeyboardShortcut = function (shortcutsString) {
565
+
566
+ var shortcutsArray = [];
567
+ var shortcutObject = {},
568
+ code = false,
569
+ shortcuts;
570
+ shortcutObject.ctrlKey = false;
571
+ shortcutObject.altKey = false;
572
+ shortcutObject.shiftKey = false;
573
+
574
+
575
+ if (typeof shortcutsString === 'string') {
576
+ shortcuts = shortcutsString.split(",");
577
+ } else {
578
+ shortcuts = shortcutsString;
579
+ shortcutObject.keyCode = shortcuts;
580
+ shortcutsArray.push(shortcutObject);
581
+ return shortcutsArray;
582
+ }
583
+
584
+ shortcuts.forEach(parseShortcut);
585
+
586
+ function parseShortcut(shortcut) {
587
+ if (shortcut.includes("CTRL")) {
588
+ shortcutObject.ctrlKey = true;
589
+ code = true;
590
+ }
591
+ if (shortcut.includes("ALT")) {
592
+ shortcutObject.altKey = true;
593
+ code = true;
594
+ }
595
+ if (shortcut.includes("SHIFT")) {
596
+ shortcutObject.shiftKey = true;
597
+ code = true;
598
+ }
599
+
600
+ if (code) {
601
+ var keys = shortcut.split("+");
602
+ shortcutObject.keyCode = keys[keys.length - 1];
603
+ } else {
604
+ shortcutObject.keyCode = shortcut;
605
+ }
606
+ shortcutsArray.push({
607
+ shiftKey: shortcutObject.shiftKey,
608
+ ctrlKey: shortcutObject.ctrlKey,
609
+ altKey: shortcutObject.altKey,
610
+ keyCode: shortcutObject.keyCode
611
+ });
612
+ shortcutObject.ctrlKey = false;
613
+ shortcutObject.altKey = false;
614
+ shortcutObject.shiftKey = false;
615
+ shortcutObject.keyCode = '';
616
+ }
617
+
618
+ return shortcutsArray;
619
+
620
+ };
621
+
622
+ Utilities.matchKeyboardShortcut = function (event, shortcutsArray) {
623
+ // The below code will return true if a single pair of shortcut matches with the clicked event
624
+ var flag = false,
625
+ eventCount = 0,
626
+ eventExists = false,
627
+ shortcutsCount = 0;
628
+
629
+ if (event.altKey) {
630
+ eventCount++;
631
+ eventExists = true;
632
+ }
633
+ if (event.shiftKey) {
634
+ eventCount++;
635
+ eventExists = true;
636
+ }
637
+ if (event.ctrlKey) {
638
+ eventCount++;
639
+ eventExists = true;
640
+ }
641
+
642
+ for (var i = 0; i < shortcutsArray.length; i++) {
643
+ var key = false,
644
+ trueCount = 0,
645
+ specifierCount = 0,
646
+ specifierExists = false;
647
+
648
+ if (shortcutsArray[i].altKey || shortcutsArray[i].shiftKey || shortcutsArray[i].ctrlKey) {
649
+ specifierExists = true;
650
+ if (shortcutsArray[i].altKey) {
651
+ shortcutsCount++;
652
+ }
653
+ if (shortcutsArray[i].ctrlKey) {
654
+ shortcutsCount++;
655
+ }
656
+ if (shortcutsArray[i].shiftKey) {
657
+ shortcutsCount++;
658
+ }
659
+ }
660
+ if (event.keyCode == shortcutsArray[i].keyCode) {
661
+
662
+ trueCount++;
663
+ key = true;
664
+ } else {
665
+ key = false;
666
+ flag = false;
667
+ continue;
668
+ }
669
+ if (event.altKey || shortcutsArray[i].altKey) {
670
+ if (event.altKey == shortcutsArray[i].altKey) {
671
+ trueCount++;
672
+ specifierCount++;
673
+ }
674
+ }
675
+ if (event.shiftKey || shortcutsArray[i].shiftKey) {
676
+ if (event.shiftKey == shortcutsArray[i].shiftKey) {
677
+ trueCount++;
678
+ specifierCount++;
679
+ }
680
+ }
681
+ if (event.ctrlKey || shortcutsArray[i].ctrlKey) {
682
+ if (event.ctrlKey == shortcutsArray[i].ctrlKey) {
683
+ trueCount++;
684
+ specifierCount++;
685
+ }
686
+ }
687
+
688
+ if ((trueCount > 1 && key == true && specifierCount == eventCount && eventCount == shortcutsCount ) ||
689
+ (trueCount = 1 && key == true && specifierExists == false && eventExists == false)) {
690
+ flag = true;
691
+ break;
692
+ }
693
+
694
+ }
695
+
696
+ return flag;
697
+ };
698
+
564
699
  return Utilities;
565
700
  });
@@ -56,7 +56,7 @@ sap.ui.define([
56
56
  *
57
57
  * @private
58
58
  * @author SAP SE
59
- * @version 1.107.0
59
+ * @version 1.109.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 */ {
@@ -21,6 +21,7 @@
21
21
  constructor( object, domElement ) {
22
22
 
23
23
  super();
24
+ var that = this;
24
25
  if ( domElement === undefined ) console.warn( 'THREE.OrbitControls: The second parameter "domElement" is now mandatory.' );
25
26
  if ( domElement === document ) console.error( 'THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.' );
26
27
  this.object = object;
@@ -570,63 +571,50 @@
570
571
  }
571
572
 
572
573
  function handleKeyDown( event ) {
573
-
574
+ const cameraRotateLeft = that.utilities.parseKeyboardShortcut(that.config.has("CAMERA_ROTATE_LEFT") ? that.config.get("CAMERA_ROTATE_LEFT") : "SHIFT+"+scope.keys.LEFT);
575
+ const cameraRotateRight = that.utilities.parseKeyboardShortcut(that.config.has("CAMERA_ROTATE_RIGHT") ? that.config.get("CAMERA_ROTATE_RIGHT") : "SHIFT+"+scope.keys.RIGHT);
576
+ const cameraRotateUp = that.utilities.parseKeyboardShortcut(that.config.has("CAMERA_ROTATE_UP") ? that.config.get("CAMERA_ROTATE_UP") : "SHIFT+"+scope.keys.UP);
577
+ const cameraRotateDown = that.utilities.parseKeyboardShortcut(that.config.has("CAMERA_ROTATE_DOWN") ? that.config.get("CAMERA_ROTATE_DOWN") : "SHIFT+"+scope.keys.DOWN);
578
+ const cameraPanLeft = that.utilities.parseKeyboardShortcut(that.config.has("CAMERA_PAN_LEFT") ? that.config.get("CAMERA_PAN_LEFT") : scope.keys.LEFT);
579
+ const cameraPanRight = that.utilities.parseKeyboardShortcut(that.config.has("CAMERA_PAN_RIGHT") ? that.config.get("CAMERA_PAN_RIGHT") : scope.keys.RIGHT);
580
+ const cameraPanUp = that.utilities.parseKeyboardShortcut(that.config.has("CAMERA_PAN_UP") ? that.config.get("CAMERA_PAN_UP") : scope.keys.UP);
581
+ const cameraPanDown = that.utilities.parseKeyboardShortcut(that.config.has("CAMERA_PAN_DOWN") ? that.config.get("CAMERA_PAN_DOWN") : scope.keys.DOWN);
582
+ const cameraZoomIn = that.utilities.parseKeyboardShortcut(that.config.has("CAMERA_ZOOM_IN") ? that.config.get("CAMERA_ZOOM_IN") : scope.keys.PLUS+","+scope.keys.NUMPLUS);
583
+ const cameraZoomOut = that.utilities.parseKeyboardShortcut(that.config.has("CAMERA_ZOOM_OUT") ? that.config.get("CAMERA_ZOOM_OUT") : scope.keys.MINUS+","+scope.keys.NUMMINUS);
574
584
  let needsUpdate = true;
575
585
 
576
- switch ( event.keyCode ) {
577
-
578
- case scope.keys.UP:
579
- if (event.shiftKey) {
580
- if (scope.enableRotate) {
581
- rotate(0, scope.keyRotateSpeed);
582
- }
583
- } else if (scope.enablePan) {
584
- pan( 0, scope.keyPanSpeed );
585
- }
586
- break;
587
-
588
- case scope.keys.DOWN:
589
- if (event.shiftKey) {
590
- if (scope.enableRotate) {
591
- rotate(0, - scope.keyRotateSpeed);
592
- }
593
- } else if (scope.enablePan) {
594
- pan( 0, - scope.keyPanSpeed );
595
- }
596
- break;
597
-
598
- case scope.keys.LEFT:
599
- if (event.shiftKey) {
600
- if (scope.enableRotate) {
601
- rotate(scope.keyRotateSpeed, 0);
602
- }
603
- } else if (scope.enablePan) {
604
- pan( scope.keyPanSpeed, 0 );
605
- }
606
- break;
607
-
608
- case scope.keys.RIGHT:
609
- if (event.shiftKey) {
610
- if (scope.enableRotate) {
611
- rotate(-scope.keyRotateSpeed, 0);
612
- }
613
- } else if (scope.enablePan) {
614
- pan( - scope.keyPanSpeed, 0 );
615
- }
616
- break;
617
-
618
- case scope.keys.MINUS:
619
- case scope.keys.NUMMINUS:
620
- dollyOut(getZoomScale());
621
- break;
622
-
623
- case scope.keys.PLUS:
624
- case scope.keys.NUMPLUS:
625
- dollyIn(getZoomScale());
626
- break;
627
-
628
- default:
629
- needsUpdate = false;
586
+ if (that.utilities.matchKeyboardShortcut(event, cameraRotateLeft)) {
587
+ rotate(scope.keyRotateSpeed, 0);
588
+ }
589
+ else if (that.utilities.matchKeyboardShortcut(event, cameraRotateRight)) {
590
+ rotate(-scope.keyRotateSpeed, 0);
591
+ }
592
+ else if (that.utilities.matchKeyboardShortcut(event, cameraRotateUp)) {
593
+ rotate(0, scope.keyRotateSpeed);
594
+ }
595
+ else if (that.utilities.matchKeyboardShortcut(event, cameraRotateDown)) {
596
+ rotate(0, - scope.keyRotateSpeed);
597
+ }
598
+ else if (that.utilities.matchKeyboardShortcut(event, cameraPanLeft)) {
599
+ pan( scope.keyPanSpeed, 0 );
600
+ }
601
+ else if (that.utilities.matchKeyboardShortcut(event, cameraPanRight)) {
602
+ pan( - scope.keyPanSpeed, 0 );
603
+ }
604
+ else if (that.utilities.matchKeyboardShortcut(event, cameraPanUp)) {
605
+ pan( 0, scope.keyPanSpeed );
606
+ }
607
+ else if (that.utilities.matchKeyboardShortcut(event, cameraPanDown)) {
608
+ pan( 0, - scope.keyPanSpeed );
609
+ }
610
+ else if (that.utilities.matchKeyboardShortcut(event, cameraZoomIn)) {
611
+ dollyIn(getZoomScale());
612
+ }
613
+ else if (that.utilities.matchKeyboardShortcut(event, cameraZoomOut)) {
614
+ dollyOut(getZoomScale());
615
+ }
616
+ else {
617
+ needsUpdate = false;
630
618
  }
631
619
 
632
620
  if ( needsUpdate ) {
@@ -1147,6 +1135,14 @@
1147
1135
 
1148
1136
  }
1149
1137
 
1138
+ setConfig(config) {
1139
+ this.config = config;
1140
+ }
1141
+
1142
+ setUtilities(utilities) {
1143
+ this.utilities = utilities;
1144
+ }
1145
+
1150
1146
  }
1151
1147
 
1152
1148
  // This set of controls performs orbiting, dollying (zooming), and panning.
@@ -3325,7 +3325,9 @@ VBI.GeoScene = function(target, mapmanager, maplayerstack) {
3325
3325
  }
3326
3326
 
3327
3327
  // reset div reference..............................................//
3328
- scene.m_Div.parentElement.removeChild(scene.m_Div);
3328
+ if (scene.m_Div.parentElement) {
3329
+ scene.m_Div.parentElement.removeChild(scene.m_Div);
3330
+ }
3329
3331
  scene.m_Div = null;
3330
3332
 
3331
3333
  // clear any timers.................................................//
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @namespace
20
20
  * @alias sap.ui.vbm
21
21
  * @author SAP SE
22
- * @version 1.107.0
22
+ * @version 1.109.0
23
23
  * @public
24
24
  */
25
25
 
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  "sap.ui.vbm.ClusterBase", "sap.ui.vbm.ClusterTree", "sap.ui.vbm.ClusterGrid", "sap.ui.vbm.ClusterDistance", "sap.ui.vbm.Heatmap",
43
43
  "sap.ui.vbm.HeatPoint", "sap.ui.vbm.ClusterContainer", "sap.ui.vbm.Adapter", "sap.ui.vbm.Adapter3D"
44
44
  ],
45
- version: "1.107.0"
45
+ version: "1.109.0"
46
46
  });
47
47
 
48
48
  sap.ui.loader.config({