Fixed tree menu positioning
Change-Id: I28cf53df1cfe60732da73af43adab998220c0f4a
diff --git a/dev/js/src/buttongroup/menu.js b/dev/js/src/buttongroup/menu.js
index 7ab149d..4615564 100644
--- a/dev/js/src/buttongroup/menu.js
+++ b/dev/js/src/buttongroup/menu.js
@@ -51,8 +51,10 @@
// Attach menu to button
button : function (btn) {
+ this._button = btn;
+
// this._attached = e;
- this._repos(btn);
+ this._repos(this._button);
this.slider().reInit();
/*
@@ -64,7 +66,7 @@
};
this._onscroll = function () {
- this._repos(btn);
+ this._repos(this._button);
}.bind(this);
window.addEventListener('scroll', this._onscroll);
diff --git a/dev/js/src/match.js b/dev/js/src/match.js
index 3140de1..ad9a5b3 100644
--- a/dev/js/src/match.js
+++ b/dev/js/src/match.js
@@ -215,6 +215,7 @@
loc.ADDTREE, ['tree'], function (e) {
if (KorAP.TreeMenu === undefined) {
KorAP.TreeMenu = buttonGroupMenuClass.create([], treeItemClass);
+ KorAP.TreeMenu.element().setAttribute('id', 'treeMenu');
};
var tm = KorAP.TreeMenu;