[Commits] r1052 - apps/opengeo/geoexplorer/trunk/lib

commits at geoext.org commits at geoext.org
Thu Jun 11 23:59:29 CEST 2009


Author: tschaub
Date: 2009-06-11 23:59:28 +0200 (Thu, 11 Jun 2009)
New Revision: 1052

Modified:
   apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
Log:
r1051 for trunk

Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-06-11 21:54:44 UTC (rev 1051)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js	2009-06-11 21:59:28 UTC (rev 1052)
@@ -986,9 +986,19 @@
      */
     createTools: function() {
 
+        var toolGroup = "toolGroup";
+
         // create a navigation control
-        var navControl = new OpenLayers.Control.Navigation();
-        this.map.addControl(navControl);        
+        var navAction = new GeoExt.Action({
+            tooltip: "Pan Map",
+            iconCls: "icon-pan",
+            enableToggle: true,
+            pressed: true,
+            allowDepress: false,
+            control: new OpenLayers.Control.Navigation(),
+            map: this.map,
+            toggleGroup: toolGroup
+        });
 
         // create a navigation history control
         var historyControl = new OpenLayers.Control.NavigationHistory();
@@ -1081,22 +1091,7 @@
         this.map.addControl(measureArea);
 
         var tools = [
-            new Ext.Button({
-                tooltip: "Pan Map",
-                iconCls: "icon-pan",
-                enableToggle: true,
-                pressed: true,
-                allowDepress: false,
-                toggleGroup: toolGroup,
-                toggleHandler: function(b, pressed) {
-                    if(pressed) {
-                        navControl.activate();
-                    } else {
-                        navControl.deactivate();
-                    }
-                },
-                scope: this
-            }),
+            navAction,
             infoButton,
             new GeoExplorer.MapToolSplitToggle({
                 tooltip: "Measure",



More information about the Commits mailing list