Remove ol.pointer.PointerEvent.createMouseEvent

The externs declarations for MouseEvent are now fixed upstream
This commit is contained in:
Frederic Junod
2014-07-02 15:49:10 +02:00
parent 434bf0bf42
commit fee4c79757

View File

@@ -257,19 +257,6 @@ ol.pointer.PointerEvent.prototype.getPressure_ = function(eventDict, buttons) {
};
/**
* Warning is suppressed because Closure thinks the MouseEvent
* constructor takes no arguments.
* @param {string} inType The type of the event to create.
* @param {Object} inDict An dictionary of initial event properties.
* @return {MouseEvent}
* @suppress {checkTypes}
*/
ol.pointer.PointerEvent.createMouseEvent = function(inType, inDict) {
return new MouseEvent(inType, inDict);
};
/**
* Is the `buttons` property supported?
* @type {boolean}
@@ -282,7 +269,7 @@ ol.pointer.PointerEvent.HAS_BUTTONS = false;
*/
(function() {
try {
var ev = ol.pointer.PointerEvent.createMouseEvent('click', {buttons: 1});
var ev = new MouseEvent('click', {buttons: 1});
ol.pointer.PointerEvent.HAS_BUTTONS = ev.buttons === 1;
} catch (e) {
}