minor skill issue *obliterated by Dalamud*

This commit is contained in:
RossAscends
2023-07-04 23:10:08 +09:00
parent 19502492c6
commit 368f3ea968

View File

@@ -561,14 +561,14 @@ export function dragElement(elmnt) {
//prevent dragging offscreen //prevent dragging offscreen
if (top <= 0) { if (top <= 0) {
elmnt.css('top', '0px'); elmnt.css('top', '0px');
} else if (top + elmnt.height() >= winHeight) { } else if (maxY >= winHeight) {
elmnt.css('top', winHeight - elmnt.height() + "px"); elmnt.css('top', winHeight - maxY + top - 1 + "px");
} }
if (left <= 0) { if (left <= 0) {
elmnt.css('left', '0px'); elmnt.css('left', '0px');
} else if (left + elmnt.width() >= winWidth) { } else if (maxX >= winWidth) {
elmnt.css('left', winWidth - elmnt.width() + "px"); elmnt.css('left', winWidth - maxX + left - 1 + "px");
} }
//prevent underlap with topbar div //prevent underlap with topbar div