Rename private attribute _element to _el
Change-Id: I9c7a31bd6844636737ffa6456562b997f5e370a3
diff --git a/dev/js/src/match/meta.js b/dev/js/src/match/meta.js
index 2df6a58..02dfa53 100644
--- a/dev/js/src/match/meta.js
+++ b/dev/js/src/match/meta.js
@@ -38,8 +38,8 @@
* Create match reference view.
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
if (this._fields === null)
return;
@@ -47,7 +47,7 @@
const metaDL = document.createElement('dl');
metaDL.classList.add("flex");
- this._element = metaDL;
+ this._el = metaDL;
const fields = this._fields;
@@ -110,9 +110,9 @@
});
// Add corpusByMatch assistant
- this._corpusByMatch = cbmClass.create(this._element);
+ this._corpusByMatch = cbmClass.create(this._el);
- return this._element;
+ return this._el;
}
};
});
diff --git a/dev/js/src/match/querycreator.js b/dev/js/src/match/querycreator.js
index b7d54fc..09d91b8 100644
--- a/dev/js/src/match/querycreator.js
+++ b/dev/js/src/match/querycreator.js
@@ -84,7 +84,7 @@
);
// Initialize element
- const e = t._element = document.createElement('p');
+ const e = t._el = document.createElement('p');
e.classList.add('query','fragment');
// Prepend info text
@@ -310,7 +310,7 @@
// Get element representing annotation line
element : function () {
- return this._element;
+ return this._el;
},
@@ -332,7 +332,7 @@
// Hide element
if (t._shown === true) {
- m.parentNode.removeChild(t._element);
+ m.parentNode.removeChild(t._el);
t._shown = false;
}
}
@@ -344,7 +344,7 @@
// Insert after
m.parentNode.insertBefore(
- t._element, m.nextSibling
+ t._el, m.nextSibling
);
t._shown = true;
};
diff --git a/dev/js/src/match/table.js b/dev/js/src/match/table.js
index 9481728..d41fc7b 100644
--- a/dev/js/src/match/table.js
+++ b/dev/js/src/match/table.js
@@ -199,15 +199,15 @@
* Get HTML table view of annotations.
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
// First the legend table
const wrap = d.createElement('div');
const table = wrap.addE('table');
- this._element = wrap;
+ this._el = wrap;
// Single row in head
let tr = table.addE('thead').addE('tr');
@@ -318,9 +318,9 @@
}, this);
// Add query creator
- this._matchCreator = matchQueryCreator.create(this._element);
+ this._matchCreator = matchQueryCreator.create(this._el);
- return this._element;
+ return this._el;
},
};
});
diff --git a/dev/js/src/match/treearc.js b/dev/js/src/match/treearc.js
index 117936c..a90fbed 100644
--- a/dev/js/src/match/treearc.js
+++ b/dev/js/src/match/treearc.js
@@ -441,8 +441,8 @@
* Get the svg element
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
// Create svg
const svg = this._c("svg");
@@ -468,8 +468,8 @@
arrow.setAttribute("d", "M 0,-5 0,5 10,0 Z");
marker.appendChild(arrow);
- this._element = svg;
- return this._element;
+ this._el = svg;
+ return this._el;
},
@@ -643,12 +643,12 @@
* This is identical to treehierarchy
*/
center : function () {
- if (this._element === undefined)
+ if (this._el === undefined)
return;
- const treeDiv = this._element.parentNode;
+ const treeDiv = this._el.parentNode;
- const cWidth = parseFloat(window.getComputedStyle(this._element).width);
+ const cWidth = parseFloat(window.getComputedStyle(this._el).width);
const treeWidth = parseFloat(window.getComputedStyle(treeDiv).width);
// Reposition:
if (cWidth > treeWidth) {
@@ -661,7 +661,7 @@
// Show the element
show : function () {
const t = this;
- const svg = this._element;
+ const svg = this._el;
const height = this.maxArc;
// Delete old group
diff --git a/dev/js/src/match/treehierarchy.js b/dev/js/src/match/treehierarchy.js
index 5273089..a52c883 100644
--- a/dev/js/src/match/treehierarchy.js
+++ b/dev/js/src/match/treehierarchy.js
@@ -186,11 +186,11 @@
* This is identical to relations
*/
center : function () {
- if (this._element === undefined)
+ if (this._el === undefined)
return;
- const treeDiv = this._element.parentNode;
- const cWidth = parseFloat(window.getComputedStyle(this._element).width);
+ const treeDiv = this._el.parentNode;
+ const cWidth = parseFloat(window.getComputedStyle(this._el).width);
const treeWidth = parseFloat(window.getComputedStyle(treeDiv).width);
// Reposition:
@@ -231,14 +231,14 @@
*/
element : function () {
- if (this._element !== undefined)
- return this._element;
+ if (this._el !== undefined)
+ return this._el;
const g = this._graph;
dagre.layout(g);
const canvas = this._c('svg');
- this._element = canvas;
+ this._el = canvas;
canvas.appendChild(this._c('defs'));
@@ -338,7 +338,7 @@
canvas.setAttribute('width', g.graph().width);
canvas.setAttribute('height', height);
- return this._element;
+ return this._el;
},
downloadLink : function () {