Merge pull request #787 from ahocevar/mousewheel-event
Wheel handler does not work on IE when interval is set. r=@bartvde
This commit is contained in:
@@ -163,9 +163,6 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
if (!overScrollableDiv && overMapDiv) {
|
if (!overScrollableDiv && overMapDiv) {
|
||||||
if (allowScroll) {
|
if (allowScroll) {
|
||||||
var delta = 0;
|
var delta = 0;
|
||||||
if (!e) {
|
|
||||||
e = window.event;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.wheelDelta) {
|
if (e.wheelDelta) {
|
||||||
delta = e.wheelDelta;
|
delta = e.wheelDelta;
|
||||||
@@ -183,9 +180,11 @@ OpenLayers.Handler.MouseWheel = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
|
|
||||||
if(this.interval) {
|
if(this.interval) {
|
||||||
window.clearTimeout(this._timeoutId);
|
window.clearTimeout(this._timeoutId);
|
||||||
|
// store e because window.event might change during delay
|
||||||
|
var evt = OpenLayers.Util.extend({}, e);
|
||||||
this._timeoutId = window.setTimeout(
|
this._timeoutId = window.setTimeout(
|
||||||
OpenLayers.Function.bind(function(){
|
OpenLayers.Function.bind(function(){
|
||||||
this.wheelZoom(e);
|
this.wheelZoom(evt);
|
||||||
}, this),
|
}, this),
|
||||||
this.interval
|
this.interval
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user