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:
parent
bf9f14cf03
commit
9a33041ac4
3 changed files with 22 additions and 13 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue