Merge pull request #933 from fredj/focus
Move focus_ position update into handleMapBrowserEvent
This commit is contained in:
+5
-5
@@ -652,11 +652,6 @@ ol.Map.prototype.handleBrowserEvent = function(browserEvent, opt_type) {
|
|||||||
var type = opt_type || browserEvent.type;
|
var type = opt_type || browserEvent.type;
|
||||||
var mapBrowserEvent = new ol.MapBrowserEvent(type, this, browserEvent);
|
var mapBrowserEvent = new ol.MapBrowserEvent(type, this, browserEvent);
|
||||||
this.handleMapBrowserEvent(mapBrowserEvent);
|
this.handleMapBrowserEvent(mapBrowserEvent);
|
||||||
if (type == goog.events.EventType.MOUSEOUT) {
|
|
||||||
this.focus_ = null;
|
|
||||||
} else {
|
|
||||||
this.focus_ = mapBrowserEvent.getCoordinate();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -669,6 +664,11 @@ ol.Map.prototype.handleMapBrowserEvent = function(mapBrowserEvent) {
|
|||||||
// coordinates so interactions cannot be used.
|
// coordinates so interactions cannot be used.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (mapBrowserEvent.type == goog.events.EventType.MOUSEOUT) {
|
||||||
|
this.focus_ = null;
|
||||||
|
} else {
|
||||||
|
this.focus_ = mapBrowserEvent.getCoordinate();
|
||||||
|
}
|
||||||
mapBrowserEvent.frameState = this.frameState_;
|
mapBrowserEvent.frameState = this.frameState_;
|
||||||
var interactions = this.getInteractions();
|
var interactions = this.getInteractions();
|
||||||
var interactionsArray = /** @type {Array.<ol.interaction.Interaction>} */
|
var interactionsArray = /** @type {Array.<ol.interaction.Interaction>} */
|
||||||
|
|||||||
Reference in New Issue
Block a user