From 43121ee4537d3588fe2d24f3746cf7031f857da2 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 29 Dec 2019 17:05:16 -0600 Subject: [PATCH] Move the powerup tooltip a bit --- gorge.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gorge.js b/gorge.js index e8043ff..555f55a 100644 --- a/gorge.js +++ b/gorge.js @@ -1337,12 +1337,10 @@ function powerupTooltip(id, event) { let tooltip = document.querySelector("#powerup-tooltip"); tooltip.style.setProperty("display", "inline-block"); - const count = buildingCount(); - fillTooltip("powerup", "name", powerups[id].name); fillTooltip("powerup", "desc", powerups[id].description); - let xPos = tooltip.parentElement.getBoundingClientRect().x + 450; + let xPos = tooltip.parentElement.getBoundingClientRect().x + 100; // wow browsers are bad @@ -1351,7 +1349,7 @@ function powerupTooltip(id, event) { var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight); - let yPos = Math.min(event.clientY, height - 200); + let yPos = Math.min(event.clientY - 100, height - 150); tooltip.style.setProperty("transform", "translate(" + xPos + "px, " + yPos + "px)") }