Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

removed datarunner on mouseout

Benjaminc8e129869942
diff --git a/web/js/map/wv.map.runningdata.js b/web/js/map/wv.map.runningdata.js
index b4069a40a..0acf626c9 100644
--- a/web/js/map/wv.map.runningdata.js
+++ b/web/js/map/wv.map.runningdata.js
@@ -212,6 +212,9 @@ wv.map.runningdata = wv.map.runningdata || function(models) {
$paletteCase.removeClass('wv-running');
$palette.removeClass('wv-running');
};
+ self.clearAll = function() {
+ $('.wv-running').removeClass('wv-running');
+ }
/*
* Add running-data component to palette for
* category layers
diff --git a/web/js/map/wv.map.ui.js b/web/js/map/wv.map.ui.js
index 595690fee..695e4c0e2 100644
--- a/web/js/map/wv.map.ui.js
+++ b/web/js/map/wv.map.ui.js
@@ -907,6 +907,9 @@ wv.map.ui = wv.map.ui || function(models, config, Rotation, DataRunner) {
var $coordBtn;
var $coordWrapper;
var coordinateFormat;
+ var hoverThrottle;
+
+
// var timer = null;
// var isIntervalSet = false;
@@ -1008,13 +1011,15 @@ wv.map.ui = wv.map.ui || function(models, config, Rotation, DataRunner) {
dataRunner.newPoint(pixelValue, map);
}
$(map.getViewport())
- .mouseover(function(){
+ .mouseover(function(e){
$('#' + mapId).show();
})
- .mouseout(function(){
+ .mouseout(function() {
$('#' + mapId).hide();
+ hoverThrottle.cancel();
+ dataRunner.clearAll();
})
- .mousemove(_.throttle(onMouseMove, 300));
+ .mousemove(hoverThrottle = _.throttle(onMouseMove, 300));
};
/*