From ffa0d655696004c02c6ff6fb46d46e928a9ab42c Mon Sep 17 00:00:00 2001 From: Martin Muda Date: Tue, 4 Apr 2023 17:26:32 -0300 Subject: [PATCH] wip coords menu --- examples/menu.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/menu.html b/examples/menu.html index 6f5e5cf..bea5812 100644 --- a/examples/menu.html +++ b/examples/menu.html @@ -237,8 +237,9 @@

Settings Form

itema.forEach(el => { el.addEventListener("click", function(e) { // Set themyForm position to the click coordinates + var tt = myForm.getBoundingClientRect() myForm.style.left = e.clientX + "px"; - myForm.style.top = e.clientY + "px"; + myForm.style.top = e.clientY - tt.height + "px"; // Show themyForm myForm.style.display = "block";