Fix tip position when the bottom of the tip is greater then browser height.

This commit is contained in:
Julia Radzhabova 2017-12-20 14:08:33 +03:00
parent e198458d58
commit f76532ac36

View file

@ -154,11 +154,15 @@
if (typeof at == 'object') {
var tp = {top: at[1] + 15, left: at[0] + 18},
innerWidth = Common.Utils.innerWidth();
innerWidth = Common.Utils.innerWidth(),
innerHeight = Common.Utils.innerHeight();
if (tp.left + $tip.width() > innerWidth) {
tp.left = innerWidth - $tip.width() - 30;
}
if (tp.top + $tip.height() > innerHeight) {
tp.top = innerHeight - $tip.height() - 30;
}
$tip.offset(tp).addClass('in');
} else {