Skip to content

Commit 34301dd

Browse files
committed
[webgeom] spelling and better formating
1 parent 5c318a5 commit 34301dd

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

ui5/geom/controller/GeomHierarchy.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ sap.ui.define(['sap/ui/core/mvc/Controller',
463463
this.selectedStack = this.getStackByPath(this.fullModel, path);
464464
},
465465

466-
/** @summary Show special message insted of nodes hierarchy */
466+
/** @summary Show special message instead of nodes hierarchy */
467467
showTextInBrowser(text) {
468468
let br = this.byId("treeTable");
469469
br.collapseAll();

ui5/geom/controller/GeomViewer.controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sap.ui.define(['sap/ui/core/mvc/Controller',
88

99
"use strict";
1010

11-
/** @summary Central geometry viewer contoller
11+
/** @summary Central geometry viewer controller
1212
* @desc All TGeo functionality is loaded after main ui5 rendering is performed,
1313
* To start drawing, following stages should be completed:
1414
* - ui5 element is rendered (onAfterRendering is called)
@@ -211,7 +211,7 @@ sap.ui.define(['sap/ui/core/mvc/Controller',
211211
},
212212

213213
/** @summary function to accumulate and process all drawings messages
214-
* @desc if not all scripts are loaded, messages are quied and processed later */
214+
* @desc if not all scripts are loaded, messages are queued and processed later */
215215
checkDrawMsg(kind, msg) {
216216
if (kind) {
217217
if (!msg)
@@ -290,7 +290,7 @@ sap.ui.define(['sap/ui/core/mvc/Controller',
290290
onWebsocketMsg(handle, msg /*, offset */) {
291291

292292
// binary data can be send only as addition to draw message
293-
// here data can be placed in the queue and processed when all other prerequicities are done
293+
// here data can be placed in the queue and processed when all other prerequisites are done
294294
if (typeof msg != "string")
295295
return console.error("Geom viewer do not uses binary messages len = " + mgs.byteLength);
296296

ui5/geom/lib/ColorBox.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sap.ui.define([
1414
},
1515

1616
// the part creating the HTML:
17-
renderer : function(oRm, oControl) { // static function, so use the given "oControl" instance instead of "this" in the renderer function
17+
renderer(oRm, oControl) { // static function, so use the given "oControl" instance instead of "this" in the renderer function
1818
// if (!oControl.getVisible()) return;
1919

2020
if (!oControl.getColor() || (oControl.getColor() == '#fff')) return;
@@ -31,7 +31,7 @@ sap.ui.define([
3131

3232
/*
3333
// an event handler:
34-
onclick : function(evt) { // is called when the Control's area is clicked - no further event registration required
34+
onclick(evt) { // is called when the Control's area is clicked - no further event registration required
3535
sap.ui.require([
3636
'sap/ui/unified/ColorPickerPopover'
3737
], function (ColorPickerPopover) {
@@ -45,8 +45,8 @@ sap.ui.define([
4545
}.bind(this));
4646
},
4747
48-
handleChange: function (oEvent) {
49-
var newColor = oEvent.getParameter("colorString");
48+
handleChange(oEvent) {
49+
let newColor = oEvent.getParameter("colorString");
5050
this.setColor(newColor);
5151
// TODO: fire a "change" event, in case the application needs to react explicitly when the color has changed
5252
// but when the color is bound via data binding, it will be updated also without this event

ui5/geom/lib/GeomDrawing.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sap.ui.define(['sap/ui/core/Control',
1212
}
1313
},
1414

15-
onBeforeRendering: function() {
15+
onBeforeRendering() {
1616
// remove Canvas and painter from DOM
1717
if (this.geom_painter) {
1818
this.geom_painter.clear3dCanvas();
@@ -21,7 +21,7 @@ sap.ui.define(['sap/ui/core/Control',
2121
},
2222

2323
// the part creating the HTML:
24-
renderer : function(oRm, oControl) { // static function, so use the given "oControl" instance instead of "this" in the renderer function
24+
renderer(oRm, oControl) { // static function, so use the given "oControl" instance instead of "this" in the renderer function
2525
oRm.write("<div");
2626
oRm.writeControlData(oControl); // writes the Control ID and enables event handling - important!
2727
// oRm.addStyle("background-color", oControl.getColor()); // write the color property; UI5 has validated it to be a valid CSS color
@@ -34,7 +34,7 @@ sap.ui.define(['sap/ui/core/Control',
3434
oRm.write("</div>"); // no text content to render; close the tag
3535
},
3636

37-
onAfterRendering: function() {
37+
onAfterRendering() {
3838
ResizeHandler.register(this, this.onResize.bind(this));
3939

4040
if (this.geom_painter) {
@@ -54,7 +54,7 @@ sap.ui.define(['sap/ui/core/Control',
5454
}
5555
},
5656

57-
setGeomPainter: function(painter, skip_cleanup) {
57+
setGeomPainter(painter, skip_cleanup) {
5858

5959
if (this.geom_painter) {
6060
if (this.geom_skip_cleanup) {
@@ -74,15 +74,14 @@ sap.ui.define(['sap/ui/core/Control',
7474
}
7575
},
7676

77-
onResize: function() {
77+
onResize() {
7878
if (this.resize_tmout) clearTimeout(this.resize_tmout);
7979
this.resize_tmout = setTimeout(this.onResizeTimeout.bind(this), 100); // minimal latency
8080
},
8181

82-
onResizeTimeout: function() {
82+
onResizeTimeout() {
8383
delete this.resize_tmout;
84-
if (this.geom_painter)
85-
this.geom_painter.checkResize();
84+
this.geom_painter?.checkResize();
8685
}
8786
});
8887

0 commit comments

Comments
 (0)