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();
height = that.height();
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
? self.y - 16 - height