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

@ -526,6 +526,11 @@ Ox.Map = function(options, self) {
}
function centerChanged() {
var tooltip = $('.OxMapMarkerTooltip');
if (tooltip.length) {
Ox.print('??', tooltip[0].className, $(tooltip[0]).data('oxid'));
Ox.UI.elements[$(tooltip[0]).data('oxid')].hide();
}
self.center = self.map.getCenter();
self.centerChanged = true;
}
@ -867,7 +872,6 @@ Ox.Map = function(options, self) {
function mapChanged() {
// gets called after panning or zooming
Ox.print('mapChanged');
var bounds;
if (self.boundsChanged) {
var bounds = self.map.getBounds(),
southWest = bounds.getSouthWest(),