[OpenLayers-Commits] r11379 - sandbox/crschmidt/pan-tap/lib/OpenLayers/Control

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Thu Feb 24 03:48:03 EST 2011


Author: crschmidt
Date: 2011-02-24 00:48:03 -0800 (Thu, 24 Feb 2011)
New Revision: 11379

Modified:
   sandbox/crschmidt/pan-tap/lib/OpenLayers/Control/Navigation.js
   sandbox/crschmidt/pan-tap/lib/OpenLayers/Control/TouchNavigation.js
Log:
Add clickOptions option to Navigation and TouchNavigation


Modified: sandbox/crschmidt/pan-tap/lib/OpenLayers/Control/Navigation.js
===================================================================
--- sandbox/crschmidt/pan-tap/lib/OpenLayers/Control/Navigation.js	2011-02-24 08:47:37 UTC (rev 11378)
+++ sandbox/crschmidt/pan-tap/lib/OpenLayers/Control/Navigation.js	2011-02-24 08:48:03 UTC (rev 11379)
@@ -36,6 +36,12 @@
      * {Object} Options passed to the DragPan control.
      */
     dragPanOptions: null,
+    
+    /**
+     * APIProprety: clickOptions
+     * {Object} Options passed to the Click handler.
+     */
+    clickOptions: null,
 
     /**
      * APIProperty: documentDrag
@@ -171,6 +177,11 @@
             'double': true, 
             'stopDouble': true
         };
+        
+        if (this.clickOptions) {
+            OpenLayers.Util.extend(clickOptions, this.clickOptions);
+        }    
+        
         this.handlers.click = new OpenLayers.Handler.Click(
             this, clickCallbacks, clickOptions
         );

Modified: sandbox/crschmidt/pan-tap/lib/OpenLayers/Control/TouchNavigation.js
===================================================================
--- sandbox/crschmidt/pan-tap/lib/OpenLayers/Control/TouchNavigation.js	2011-02-24 08:47:37 UTC (rev 11378)
+++ sandbox/crschmidt/pan-tap/lib/OpenLayers/Control/TouchNavigation.js	2011-02-24 08:48:03 UTC (rev 11379)
@@ -30,6 +30,12 @@
      * {Object} Options passed to the DragPan control.
      */
     dragPanOptions: null,
+    
+    /**
+     * APIProprety: clickOptions
+     * {Object} Options passed to the click handler.
+     */
+    clickOptions: null,
 
     /**
      * APIProperty: documentDrag
@@ -109,6 +115,9 @@
             'double': true,
             'stopDouble': true
         };
+        if (this.clickOptions) {
+            OpenLayers.Util.extend(clickOptions, this.clickOptions);
+        }    
         this.handlers.click = new OpenLayers.Handler.Click(
             this, clickCallbacks, clickOptions
         );



More information about the Commits mailing list