Cloning event for use in delayed function
In IE, where window.event is used, the event can change during the delay. To avoid this, we store the event properties in a new object.
This commit is contained in:
@@ -183,9 +183,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