Rename private attribute _element to _el
Change-Id: I9c7a31bd6844636737ffa6456562b997f5e370a3
diff --git a/dev/js/src/menu/item.js b/dev/js/src/menu/item.js
index 7ce7455..e369918 100644
--- a/dev/js/src/menu/item.js
+++ b/dev/js/src/menu/item.js
@@ -105,8 +105,8 @@
*/
element : function () {
// already defined
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
// Create list item
const li = document.createElement("li");
@@ -119,7 +119,7 @@
// Append template
li.appendChild(this.content());
- return this._element = li;
+ return this._el = li;
},
/**
diff --git a/dev/js/src/menu/lengthField.js b/dev/js/src/menu/lengthField.js
index 8a6641d..eed90b7 100644
--- a/dev/js/src/menu/lengthField.js
+++ b/dev/js/src/menu/lengthField.js
@@ -12,8 +12,8 @@
// Initialize lengthField object
_init : function () {
- this._element = document.createElement('div');
- this._element.classList.add('lengthField');
+ this._el = document.createElement('div');
+ this._el.classList.add('lengthField');
return this;
},
@@ -36,7 +36,7 @@
* Get the associated dom element.
*/
element : function () {
- return this._element;
+ return this._el;
},
@@ -44,7 +44,7 @@
* Add string to lengthField.
*/
add : function (param) {
- this._element.appendChild(document.createElement('span'))
+ this._el.appendChild(document.createElement('span'))
.appendChild(document.createTextNode(param[0] + '--'));
},
@@ -53,8 +53,8 @@
* Remove all initialized values
*/
reset : function () {
- while (this._element.firstChild) {
- this._element.firstChild.remove();
+ while (this._el.firstChild) {
+ this._el.firstChild.remove();
};
}
});
diff --git a/dev/js/src/menu/prefix.js b/dev/js/src/menu/prefix.js
index e513e85..3930e45 100644
--- a/dev/js/src/menu/prefix.js
+++ b/dev/js/src/menu/prefix.js
@@ -17,19 +17,19 @@
t._string = '';
// Add prefix span
- t._element = document.createElement('span');
- t._element.classList.add('pref');
+ t._el = document.createElement('span');
+ t._el.classList.add('pref');
// Connect action
if (t["onclick"] !== undefined)
- t._element["onclick"] = t.onclick.bind(t);
+ t._el["onclick"] = t.onclick.bind(t);
return t;
},
_update : function () {
- return this._element.innerHTML
+ return this._el.innerHTML
= this._string;
},
@@ -132,7 +132,7 @@
* Get the associated dom element.
*/
element : function () {
- return this._element;
+ return this._el;
},
diff --git a/dev/js/src/menu/slider.js b/dev/js/src/menu/slider.js
index 5897da2..dcc6fc5 100644
--- a/dev/js/src/menu/slider.js
+++ b/dev/js/src/menu/slider.js
@@ -60,12 +60,12 @@
if (arguments.length === 1) {
if (bool) {
if (!this._active) {
- this._element.classList.add('active');
+ this._el.classList.add('active');
this._active = true;
};
}
else if (this._active) {
- this._element.classList.remove('active');
+ this._el.classList.remove('active');
this._active = false;
}
};
@@ -140,7 +140,7 @@
* Get the associated dom element.
*/
element : function () {
- return this._element;
+ return this._el;
},
@@ -151,7 +151,7 @@
reInit : function () {
const t = this;
- const s = t._element.style;
+ const s = t._el.style;
// Do not show the slider, in case there is nothing to scroll
if (t._length <= t._limit) {
@@ -179,7 +179,7 @@
t._event = {};
t._active = false;
- const el = t._element = document.createElement('div');
+ const el = t._el = document.createElement('div');
el.setAttribute('class', 'ruler');
t._slider = el.appendChild(
@@ -204,7 +204,7 @@
// Reinit height based on dom position
_initClientHeight : function () {
- this._rulerHeight = this._element.clientHeight;
+ this._rulerHeight = this._el.clientHeight;
this._sliderHeight = this._slider.clientHeight;
},