From 4f43a81313f9b77ab4293556b545979af3106547 Mon Sep 17 00:00:00 2001 From: reschan Date: Thu, 16 Jun 2022 07:18:29 +0700 Subject: [PATCH] change columns to 9, adjust sizes, fix selecteds --- builder/index.html | 2 +- css/sq2bs.css | 9 +++------ js/sq2bs.js | 18 ++++++++---------- media/atree/connect-3.png | Bin 0 -> 7142 bytes 4 files changed, 12 insertions(+), 17 deletions(-) create mode 100644 media/atree/connect-3.png diff --git a/builder/index.html b/builder/index.html index 919c603..c307134 100644 --- a/builder/index.html +++ b/builder/index.html @@ -617,7 +617,7 @@
-
+
Active:
diff --git a/css/sq2bs.css b/css/sq2bs.css index 6790cb9..27fb6dd 100644 --- a/css/sq2bs.css +++ b/css/sq2bs.css @@ -475,12 +475,9 @@ a:hover { } /* atree hover */ -.atree-node { - opacity: 75%; -} - -.atree-node:hover { - opacity: 100%; +.atree-selected { + border: 5px solid blue; + border-radius: 50%; } .hide-scroll { diff --git a/js/sq2bs.js b/js/sq2bs.js index 8b97a88..cf57510 100644 --- a/js/sq2bs.js +++ b/js/sq2bs.js @@ -544,10 +544,10 @@ function construct_AT(elem, tree) { let row = document.createElement('div'); row.classList.add("row"); row.id = "atree-row-" + j; - row.style.height = elem.getBoundingClientRect().width / 5 + "px"; + row.style.height = elem.getBoundingClientRect().width / 9 + "px"; - for (let k = 0; k < 5; k++) { + for (let k = 0; k < 9; k++) { col = document.createElement('div'); col.classList.add('col', 'px-0'); row.appendChild(col); @@ -571,7 +571,7 @@ function construct_AT(elem, tree) { if (e.target !== this) {return;} let tooltip = this.children[0]; tooltip.style.top = this.getBoundingClientRect().bottom + window.scrollY * 1.02 + "px"; - tooltip.style.left = this.parentElement.parentElement.getBoundingClientRect().left + (elem.getBoundingClientRect().width * .05 / 2) + "px"; + tooltip.style.left = this.parentElement.parentElement.getBoundingClientRect().left + (elem.getBoundingClientRect().width * .2 / 2) + "px"; tooltip.style.display = "block"; }); @@ -581,13 +581,11 @@ function construct_AT(elem, tree) { tooltip.style.display = "none"; }); - - - node_elem.classList.add("atree-node"); + node_elem.classList.add("fake-button"); let active_tooltip = document.createElement('div'); - active_tooltip.classList.add("rounded-bottom", "dark-7", "border"); - active_tooltip.style.width = elem.getBoundingClientRect().width * .95 + "px"; + active_tooltip.classList.add("rounded-bottom", "dark-7", "border", "mb-2", "mx-auto"); + active_tooltip.style.width = elem.getBoundingClientRect().width * .80 + "px"; active_tooltip.style.display = "none"; // tooltip text formatting @@ -618,11 +616,11 @@ function construct_AT(elem, tree) { let tooltip = document.getElementById("atree-ab-" + node.title.replaceAll(" ", "")); if (tooltip.style.display == "block") { tooltip.style.display = "none"; - this.classList.add("atree-node"); + this.classList.remove("atree-selected"); } else { tooltip.style.display = "block"; - this.classList.remove("atree-node"); + this.classList.add("atree-selected"); } }); }; diff --git a/media/atree/connect-3.png b/media/atree/connect-3.png new file mode 100644 index 0000000000000000000000000000000000000000..736036614e8594d8f6ea71c1300c387407a62b4f GIT binary patch literal 7142 zcmeHMc{J2*`yXqvL?MI97?N$w3IQI;$v z(I$FQM2m>Dh-OevDV5)M)YEd__x+vIbAIpduVy)Of3M|pUDxNn?)%*LnRItIM;S>K zNeBcYOlW&PaiRf`{wE+TTSO*Got3( z^{#krfg3bEJ3mqodc17paQNJbQ;dt{f5mNk|74EW+Ok!=ZYgb0Eq}+G=D~L{9pSAb zyXoS(PdGh%wZ6J@WfszG7X{ZN@lsgvPt)(`jBKlPuDUL40ewPm^g+w9tE z^uWC$E6Vnd#n68F_M6c5%*H)@sI1uGIBtfFlJc(xSPxHO{O2g};%{ zZO@dd*JmobJo^>LaK~z@G7>|#k#!sB!?JJL-k%La+Os>q0F~3XxQjqC|!g|;7~TQ10!r>s8^KX1#RHlvS+Mv zU42uTu%N>p6NrZ@@E*Cc`qx9PDYaDXm`>J6V-C(ZoVtcxz&P zC`Wvc1t;IbF%RY;XQe5%K1Y}KVX^K_W9qZc+HPDCH&mrqYxT_={&k@(hojp*Onedw z{cMfUKkBl#x^l$eH6XzlNs=~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