Merge pull request #2429 from fredj/reuse-pixel-for-coord

Reuse event pixel to compute the coordinate
This commit is contained in:
Frédéric Junod
2014-07-24 07:54:39 +02:00

View File

@@ -45,18 +45,18 @@ ol.MapBrowserEvent = function(type, map, browserEvent, opt_frameState) {
*/
this.originalEvent = browserEvent.getBrowserEvent();
/**
* @type {ol.Coordinate}
* @api
*/
this.coordinate = map.getEventCoordinate(this.originalEvent);
/**
* @type {ol.Pixel}
* @api
*/
this.pixel = map.getEventPixel(this.originalEvent);
/**
* @type {ol.Coordinate}
* @api
*/
this.coordinate = map.getCoordinateFromPixel(this.pixel);
};
goog.inherits(ol.MapBrowserEvent, ol.MapEvent);