1
0
Fork 0
forked from 0x2620/oxjs

smaller fixes (tooltip corner cases, block timeline)

This commit is contained in:
rolux 2011-05-17 19:04:33 +02:00
commit 9650a29a90
4 changed files with 21 additions and 15 deletions

View file

@ -55,8 +55,8 @@ Ox.Tooltip = function(options, self) {
that.appendTo(Ox.UI.$body);
width = that.width();
height = that.height();
left = Ox.limit(x - width / 2, 0, Ox.UI.$document.width() - width);
top = y > Ox.UI.$document.height() - height - 16 ? y - 32 : y + 16;
left = Ox.limit(x - width / 2, 0, window.innerWidth - width);
top = y > window.innerHeight - height - 16 ? y - 16 - height : y + 16;
that.css({
left: left + 'px',
top: top + 'px'