Add workaround for mousewheel event name

'DOMMouseScroll' for Gecko and 'mousewheel' otherwise.

See https://github.com/google/closure-library/pull/308
This commit is contained in:
Frederic Junod
2014-07-29 16:57:59 +02:00
parent 7b7070d723
commit 3fce080d5a

View File

@@ -263,7 +263,8 @@ ol.Map = function(options) {
goog.events.EventType.TOUCHSTART,
goog.events.EventType.MSPOINTERDOWN,
ol.MapBrowserEvent.EventType.POINTERDOWN,
goog.events.MouseWheelHandler.EventType.MOUSEWHEEL
// see https://github.com/google/closure-library/pull/308
goog.userAgent.GECKO ? 'DOMMouseScroll' : 'mousewheel'
], goog.events.Event.stopPropagation);
goog.dom.appendChild(this.viewport_, this.overlayContainerStopEvent_);