1
0
Fork 0
forked from 0x2620/oxjs

hide marker tooltip when map center changes; when hiding a tooltip, don't remove but detach it, so that when it is shown again, its oxid is still present on its dom element

This commit is contained in:
rlx 2011-11-03 13:59:54 +00:00
commit 9a33041ac4
3 changed files with 22 additions and 13 deletions

View file

@ -37,10 +37,10 @@ Ox.Tooltip = function(options, self) {
that.animate({
opacity: 0
}, 250, function() {
that.removeElement();
that.detach();
});
} else {
that.removeElement();
that.detach();
}
}
return that;
@ -58,7 +58,7 @@ Ox.Tooltip = function(options, self) {
self.x = x;
self.y = y
}
$('.OxTooltip').remove(); // fixme: don't use DOM
$('.OxTooltip').detach(); // fixme: don't use DOM
that.appendTo(Ox.UI.$body);
width = that.width();
height = that.height();