Skip to content

Commit

Permalink
wip coords menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Muda committed Apr 4, 2023
1 parent 8c448e5 commit ffa0d65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,9 @@ <h1>Settings Form</h1>
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";
Expand Down

0 comments on commit ffa0d65

Please sign in to comment.