Apply "patch to put event registering in correct place", euzuro, #448 .

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2075 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-12-16 15:47:37 +00:00
parent 94dc03ea90
commit 9c6817f5d6

View File

@@ -20,14 +20,6 @@ OpenLayers.Control.MouseDefaults.prototype =
*/
initialize: function() {
OpenLayers.Control.prototype.initialize.apply(this, arguments);
//register mousewheel events specifically on the window and document
OpenLayers.Event.observe(window, "DOMMouseScroll",
this.onWheelEvent.bindAsEventListener(this));
OpenLayers.Event.observe(window, "mousewheel",
this.onWheelEvent.bindAsEventListener(this));
OpenLayers.Event.observe(document, "mousewheel",
this.onWheelEvent.bindAsEventListener(this));
},
/**
@@ -40,6 +32,15 @@ OpenLayers.Control.MouseDefaults.prototype =
this.map.events.register( "mouseup", this, this.defaultMouseUp );
this.map.events.register( "mousemove", this, this.defaultMouseMove );
this.map.events.register( "mouseout", this, this.defaultMouseOut );
//register mousewheel events specifically on the window and document
OpenLayers.Event.observe(window, "DOMMouseScroll",
this.onWheelEvent.bindAsEventListener(this));
OpenLayers.Event.observe(window, "mousewheel",
this.onWheelEvent.bindAsEventListener(this));
OpenLayers.Event.observe(document, "mousewheel",
this.onWheelEvent.bindAsEventListener(this));
},
/**