bugfix/tooltip_wrong_position: fixed

pull/1997/head
shuang 2022-01-16 11:39:18 +08:00
parent f9bca655e5
commit 4601db2ac1
1 changed files with 16 additions and 0 deletions

View File

@ -132,6 +132,10 @@ function align(el) {
alignTop(el); alignTop(el);
if (isOutOfBounds(el)) { if (isOutOfBounds(el)) {
alignBottom(el); alignBottom(el);
if (isOutOfBounds(el)) {
alignTop(el);
}
} }
} }
else if (modifiers.left) { else if (modifiers.left) {
@ -144,6 +148,10 @@ function align(el) {
if (isOutOfBounds(el)) { if (isOutOfBounds(el)) {
alignBottom(el); alignBottom(el);
if (isOutOfBounds(el)) {
alignLeft(el);
}
} }
} }
} }
@ -152,6 +160,10 @@ function align(el) {
alignBottom(el); alignBottom(el);
if (isOutOfBounds(el)) { if (isOutOfBounds(el)) {
alignTop(el); alignTop(el);
if (isOutOfBounds(el)) {
alignBottom(el);
}
} }
} }
else { else {
@ -164,6 +176,10 @@ function align(el) {
if (isOutOfBounds(el)) { if (isOutOfBounds(el)) {
alignBottom(el); alignBottom(el);
if (isOutOfBounds(el)) {
alignRight(el);
}
} }
} }
} }