Trackster: use hover event for feature track popups

This commit is contained in:
James Taylor
2011-11-07 10:21:17 -05:00
parent e669a876aa
commit 43ec3def31
3 changed files with 13 additions and 4 deletions
+10 -1
View File
@@ -2242,7 +2242,16 @@ FeatureTrackTile.prototype.predisplay_actions = function() {
// Only show popups in Pack mode.
if (tile.mode !== "Pack") { return; }
$(this.canvas).mousemove(function (e) {
$(this.canvas).hover( function() {
this.hovered = true;
$(this).mousemove();
}, function() {
this.hovered = false;
// Clear popup if it is still hanging around (this is probably not needed)
$(this).siblings(".feature-popup").remove();
} ).mousemove(function (e) {
// Use the hover plugin to get a delay before showing popup
if ( !this.hovered ) { return; }
// Get feature data for position.
var
this_offset = $(this).offset(),