Fixed positioning of query creator
Change-Id: I634f497427d8dc100170541fae343098bc76f1cf
diff --git a/dev/js/src/match/info.js b/dev/js/src/match/info.js
index f8ac2cc..7a659ba 100644
--- a/dev/js/src/match/info.js
+++ b/dev/js/src/match/info.js
@@ -280,7 +280,7 @@
matchtable.classList.remove('loading');
// Add query creator
- this._matchCreator = matchQueryCreator.create(matchtable);
+ this._matchCreator = matchQueryCreator.create(info);
});
// Get spans
diff --git a/dev/js/src/match/querycreator.js b/dev/js/src/match/querycreator.js
index ca5aaf9..d9c41de 100644
--- a/dev/js/src/match/querycreator.js
+++ b/dev/js/src/match/querycreator.js
@@ -21,8 +21,11 @@
this._query = []
this._matchInfo = matchInfo;
+ // Get the match table
+ this._matchTable = this._matchInfo.getElementsByClassName('matchtable')[0];
+
// Listen on the match table
- this._matchInfo.addEventListener(
+ this._matchTable.addEventListener(
"click", this.clickOnAnno.bind(this), false
);
@@ -187,7 +190,7 @@
else {
if (this._shown === false) {
- this._matchInfo.appendChild(this._element);
+ this._matchInfo.insertBefore(this._element, this._matchTable.nextSibling);
this._shown = true;
};