fix(Dialog-box): Fix the issue of blocked headers in dialogBox components (#620)

This commit is contained in:
黄怡林 2023-10-23 00:58:42 -07:00 committed by GitHub
parent b0aec35557
commit 0022b6792d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -295,8 +295,8 @@ export const handleDrag =
let offsetWidth = modalBoxElem.offsetWidth
let offsetHeight = modalBoxElem.offsetHeight
let maxX = visibleWidth - offsetWidth
let maxY = visibleHeight - offsetHeight
let maxX = Math.max(visibleWidth - offsetWidth, 0)
let maxY = Math.max(visibleHeight - offsetHeight, 0)
let left = event.clientX - disX
let top = event.clientY - disY