Define ol.pointer.PointerEvent.createMouseEvent before using it
Fixes #1961
This commit is contained in:
@@ -257,6 +257,19 @@ 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}
|
||||
@@ -274,16 +287,3 @@ ol.pointer.PointerEvent.HAS_BUTTONS = false;
|
||||
} catch (e) {
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
/**
|
||||
* 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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user