[Commits] r753 - sandbox/elemoine/playground/geoext/examples

commits at geoext.org commits at geoext.org
Fri May 15 11:01:57 CEST 2009


Author: elemoine
Date: 2009-05-15 11:01:57 +0200 (Fri, 15 May 2009)
New Revision: 753

Modified:
   sandbox/elemoine/playground/geoext/examples/toolbar.js
Log:
add history control to the toolbar and the menu


Modified: sandbox/elemoine/playground/geoext/examples/toolbar.js
===================================================================
--- sandbox/elemoine/playground/geoext/examples/toolbar.js	2009-05-15 08:50:18 UTC (rev 752)
+++ sandbox/elemoine/playground/geoext/examples/toolbar.js	2009-05-15 09:01:57 UTC (rev 753)
@@ -79,6 +79,22 @@
         })
     );
 
+    // Navigation history - two "button" controls
+    ctrl = new OpenLayers.Control.NavigationHistory();
+    map.addControl(ctrl);
+    toolbarItems.push(
+        GeoExt.Action.fromControl(ctrl.previous, {
+            text: "previous",
+            disabled: true
+        })
+    );
+    toolbarItems.push(
+        GeoExt.Action.fromControl(ctrl.next, {
+            text: "next",
+            disabled: true
+        })
+    );
+
     // Reuse the GeoExt.Action objects created above
     // as menu items
     toolbarItems.push({
@@ -94,7 +110,10 @@
                 // Draw line
                 new Ext.menu.CheckItem(toolbarItems[3]),
                 // Select control
-                new Ext.menu.CheckItem(toolbarItems[4])
+                new Ext.menu.CheckItem(toolbarItems[4]),
+                // Navigation history control
+                toolbarItems[5],
+                toolbarItems[6]
             ]
         })
     });



More information about the Commits mailing list