Skip to content

Commit

Permalink
Hover out of tooltips when layers change
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom MacWright committed Apr 6, 2011
1 parent e0acdb9 commit bf77c73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions control/lib/tooltip.js
Expand Up @@ -60,8 +60,14 @@ wax.tooltip.select = function(feature, context, layer_id, evt) {
wax.tooltip.unselect = function(feature, context, layer_id, evt) {
$(context)
.css('cursor', 'default')
$('div.wax-tooltip-' + layer_id + ':not(.wax-popup)')
.remove();
if (layer_id) {
$('div.wax-tooltip-' + layer_id + ':not(.wax-popup)')
.remove();
} else {
$('div.wax-tooltip:not(.wax-popup)')
.remove();
}

// TODO: remove
$('div', context).css('cursor', 'default');

Expand Down
1 change: 1 addition & 0 deletions control/ol/interaction.js
Expand Up @@ -87,6 +87,7 @@ wax.ol.Interaction =

resetLayers: function() {
this._viableLayers = null;
this.callbacks['out']();
},

// React to a click mouse event
Expand Down

0 comments on commit bf77c73

Please sign in to comment.