Add experimental controls infrastructure, thanks @elemoine

This commit is contained in:
Tom Payne
2012-07-18 13:32:22 +02:00
parent 1af79ede29
commit c6343ed2bc
11 changed files with 214 additions and 381 deletions

35
src/ol/mapevent.js Normal file
View File

@@ -0,0 +1,35 @@
goog.provide('ol.MapEvent');
goog.require('goog.events.Event');
/**
* @constructor
* @extends {goog.events.Event}
* @param {string} type Event type.
* @param {ol.Map} map Map.
*/
ol.MapEvent = function(type, map) {
goog.base(this, type);
/**
* @type {ol.Map}
*/
this.map = map;
/**
* @type {boolean}
*/
this.defaultPrevented = false;
};
goog.inherits(ol.MapEvent, goog.events.Event);
/**
*/
ol.MapEvent.prototype.preventDefault = function() {
this.defaultPrevented = true;
};