improve readability of style assignment
This commit is contained in:
parent
df0ab92bef
commit
cffa9bbd04
1 changed files with 9 additions and 2 deletions
11
js/atree.js
11
js/atree.js
|
@ -1048,8 +1048,15 @@ function render_AT(UI_elem, list_elem, tree) {
|
||||||
delete node_wrap.tooltip_elem;
|
delete node_wrap.tooltip_elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
node_wrap.tooltip_elem = make_elem("div", ["rounded-bottom", "dark-4", "border", "mx-2", "my-4", "dark-shadow", "text-start"],
|
node_wrap.tooltip_elem = make_elem("div", ["rounded-bottom", "dark-4", "border", "mx-2", "my-4", "dark-shadow", "text-start"], {
|
||||||
{style: "position: absolute; z-index: 100; top: " + (node_elem.getBoundingClientRect().top + window.pageYOffset + 50) + "px; left: " + UI_elem.getBoundingClientRect().left + "px; width: " + UI_elem.getBoundingClientRect().width * 0.95 + "px;"});
|
style: {
|
||||||
|
position: "absolute",
|
||||||
|
zIndex: "100",
|
||||||
|
top: (node_elem.getBoundingClientRect().top + window.pageYOffset + 50) + "px",
|
||||||
|
left: UI_elem.getBoundingClientRect().left + "px",
|
||||||
|
width: (UI_elem.getBoundingClientRect().width * 0.95) + "px"
|
||||||
|
}
|
||||||
|
});
|
||||||
generateTooltip(node_wrap.tooltip_elem, node_elem, ability, atree_map);
|
generateTooltip(node_wrap.tooltip_elem, node_elem, ability, atree_map);
|
||||||
UI_elem.appendChild(node_wrap.tooltip_elem);
|
UI_elem.appendChild(node_wrap.tooltip_elem);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue