when positioning tooltip, make sure x is an integer

This commit is contained in:
rlx 2012-04-24 08:19:05 +00:00
parent d7f0464ee6
commit 07b44e20c8

View file

@ -69,7 +69,7 @@ Ox.Tooltip = function(options, self) {
width = that.width(); width = that.width();
height = that.height(); height = that.height();
left = Ox.limit( left = Ox.limit(
self.x - width / 2, 0, window.innerWidth - width - 8 self.x - Math.round(width / 2), 0, window.innerWidth - width - 8
); );
top = self.y > window.innerHeight - height - 16 top = self.y > window.innerHeight - height - 16
? self.y - 16 - height ? self.y - 16 - height