From d091cfd508ae39381157353f5ac0e3943466cb61 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 28 Aug 2013 12:39:22 +0200 Subject: [PATCH] Move focus_ position update into handleMapBrowserEvent Otherwise, the position is only updated on keyboard or mouse wheel events. --- src/ol/map.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ol/map.js b/src/ol/map.js index 8fa48bedfe..1fa938ba70 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -617,11 +617,6 @@ ol.Map.prototype.handleBrowserEvent = function(browserEvent, opt_type) { var type = opt_type || browserEvent.type; var mapBrowserEvent = new ol.MapBrowserEvent(type, this, browserEvent); this.handleMapBrowserEvent(mapBrowserEvent); - if (type == goog.events.EventType.MOUSEOUT) { - this.focus_ = null; - } else { - this.focus_ = mapBrowserEvent.getCoordinate(); - } }; @@ -634,6 +629,11 @@ ol.Map.prototype.handleMapBrowserEvent = function(mapBrowserEvent) { // coordinates so interactions cannot be used. return; } + if (mapBrowserEvent.type == goog.events.EventType.MOUSEOUT) { + this.focus_ = null; + } else { + this.focus_ = mapBrowserEvent.getCoordinate(); + } mapBrowserEvent.frameState = this.frameState_; var interactions = this.getInteractions(); var interactionsArray = /** @type {Array.} */