avoid having the tooltip go off-screen
This commit is contained in:
parent
23d846981e
commit
aabaeed585
@ -298,6 +298,9 @@ export class Tooltip {
|
|||||||
if (r.right > w) {
|
if (r.right > w) {
|
||||||
r.offset(-clientWidth - 20, 0);
|
r.offset(-clientWidth - 20, 0);
|
||||||
}
|
}
|
||||||
|
if (r.left < 0) {
|
||||||
|
r.offset(-r.left, 0);
|
||||||
|
}
|
||||||
if (r.bottom > h) {
|
if (r.bottom > h) {
|
||||||
r.offset(0, -clientHeight - 20);
|
r.offset(0, -clientHeight - 20);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user