Reuse event pixel to compute the coordinate

This commit is contained in:
Frederic Junod
2014-07-23 16:53:56 +02:00
parent d3e575339b
commit b2e345c407

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);