From de6108f187bc44cd00e3189b3a2685d24d6c5b00 Mon Sep 17 00:00:00 2001 From: fin444 Date: Sat, 23 Jul 2022 18:14:03 -0400 Subject: [PATCH] remove unnecessary div stacking in atree --- js/atree.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/atree.js b/js/atree.js index 7222688..0033921 100644 --- a/js/atree.js +++ b/js/atree.js @@ -1008,7 +1008,7 @@ function render_AT(UI_elem, list_elem, tree) { } // create node - let node_elem = document.createElement('div'); + let node_elem = document.getElementById("atree-row-" + ability.display.row).children[ability.display.col]; node_wrap.img = make_elem("div", [], {style: "width: 200%; height: 200%; position: absolute; top: -50%; left: -50%; image-rendering: pixelated; z-index: 1; background-image: url('../media/atree/icons.png'); background-size: 900% 300%;"}) node_elem.appendChild(node_wrap.img); @@ -1048,8 +1048,6 @@ function render_AT(UI_elem, list_elem, tree) { delete node_wrap.tooltip_elem; } }); - - document.getElementById("atree-row-" + ability.display.row).children[ability.display.col].appendChild(node_elem); }; atree_render_connection(atree_connectors_map);