From ffb61b49d051cba8b8fa18ad8925d68e7c890194 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Mon, 7 Apr 2014 17:47:57 +0200 Subject: [PATCH] Define ol.pointer.PointerEvent.createMouseEvent before using it Fixes #1961 --- src/ol/pointer/pointerevent.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/ol/pointer/pointerevent.js b/src/ol/pointer/pointerevent.js index fa23619e13..503578d866 100644 --- a/src/ol/pointer/pointerevent.js +++ b/src/ol/pointer/pointerevent.js @@ -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); -};