[OpenLayers-Commits] r2075 - trunk/openlayers/lib/OpenLayers/Control

commits at openlayers.org commits at openlayers.org
Sat Dec 16 10:47:38 EST 2006


Author: crschmidt
Date: 2006-12-16 10:47:37 -0500 (Sat, 16 Dec 2006)
New Revision: 2075

Modified:
   trunk/openlayers/lib/OpenLayers/Control/MouseDefaults.js
Log:
Apply "patch to put event registering in correct place", euzuro, #448 .


Modified: trunk/openlayers/lib/OpenLayers/Control/MouseDefaults.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Control/MouseDefaults.js	2006-12-16 15:30:16 UTC (rev 2074)
+++ trunk/openlayers/lib/OpenLayers/Control/MouseDefaults.js	2006-12-16 15:47:37 UTC (rev 2075)
@@ -20,14 +20,6 @@
      */
     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 @@
         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));
+
     },
 
     /**



More information about the Commits mailing list