avoid having the tooltip go off-screen

This commit is contained in:
Nils Maier 2019-08-20 21:04:02 +02:00
parent 23d846981e
commit aabaeed585

View File

@ -298,6 +298,9 @@ export class Tooltip {
if (r.right > w) {
r.offset(-clientWidth - 20, 0);
}
if (r.left < 0) {
r.offset(-r.left, 0);
}
if (r.bottom > h) {
r.offset(0, -clientHeight - 20);
}