Clean up directory structure

This commit is contained in:
Tom Payne
2012-07-22 01:37:58 +02:00
parent 3eefbaa337
commit 65b7504c9f
38 changed files with 0 additions and 0 deletions
+59
View File
@@ -0,0 +1,59 @@
goog.provide('ol.MapBrowserEvent');
goog.require('goog.events.BrowserEvent');
goog.require('ol.Coordinate');
goog.require('ol.MapEvent');
/**
* @constructor
* @extends {ol.MapEvent}
* @param {string} type Event type.
* @param {ol.Map} map Map.
* @param {goog.events.BrowserEvent} browserEventObject Browser event object.
*/
ol.MapBrowserEvent = function(type, map, browserEventObject) {
goog.base(this, type, map);
/**
* @private
* @type {goog.events.BrowserEvent}
*/
this.browserEventObject_ = browserEventObject;
};
goog.inherits(ol.MapBrowserEvent, ol.MapEvent);
/**
* @private
* @type {ol.Coordinate}
*/
ol.MapBrowserEvent.prototype.coordinate_;
/**
* @return {ol.Coordinate} Coordinate.
*/
ol.MapBrowserEvent.prototype.getCoordinate = function() {
if (goog.isDef(this.coordinate_)) {
return this.coordinate_;
} else {
var browserEventObject = this.getBrowserEventObject();
var pixel = new ol.Coordinate(
browserEventObject.offsetX, browserEventObject.offsetY);
var coordinate = this.map.getCoordinateFromPixel(pixel);
this.coordinate_ = coordinate;
return coordinate;
}
};
/**
* @return {goog.events.BrowserEvent} Browser event object.
*/
ol.MapBrowserEvent.prototype.getBrowserEventObject = function() {
return this.browserEventObject_;
};