Fix breaking old menu position

This commit is contained in:
pythongosssss 2024-06-22 17:21:02 +01:00
parent 120c99eccc
commit 46c8fd5178

View File

@ -107,6 +107,8 @@ function dragElement(dragEl, settings) {
} }
function positionElement() { function positionElement() {
if(dragEl.style.display === "none") return;
const halfWidth = document.body.clientWidth / 2; const halfWidth = document.body.clientWidth / 2;
const anchorRight = newPosX + dragEl.clientWidth / 2 > halfWidth; const anchorRight = newPosX + dragEl.clientWidth / 2 > halfWidth;