[Commits] r1862 - sandbox/redlining/ux/FeatureEditing/ux/widgets

commits at geoext.org commits at geoext.org
Tue Feb 2 21:12:14 CET 2010


Author: adube
Date: 2010-02-02 21:12:14 +0100 (Tue, 02 Feb 2010)
New Revision: 1862

Modified:
   sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js
Log:
toggleGroup now as an option instead of hardcoded to this.map.id

Modified: sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js
===================================================================
--- sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js	2010-02-02 20:05:17 UTC (rev 1861)
+++ sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js	2010-02-02 20:12:14 UTC (rev 1862)
@@ -194,6 +194,13 @@
      */
     export: true,
 
+    /** api: property[toggleGroup]
+     *  ``String``
+     *  The name of the group used for the buttons created.  If none is
+     *  provided, it's set to this.map.id.
+     */
+    toggleGroup: null,
+
     /** private: method[constructor]
      *  Private constructor override.
      */
@@ -306,6 +313,11 @@
         if (!this.map) {
             this.map = GeoExt.MapPanel.guess().map;
         }
+
+        // if no toggleGroup was defined, set to this.map.id
+        if (!this.toggleGroup) {
+            this.toggleGroup = this.map.id;
+        }
     },
 
     /** private: method[initFeatureControl]
@@ -328,12 +340,12 @@
             control: control,
             map: this.map,
             // button options
-            toggleGroup: this.map.id,
+            toggleGroup: this.toggleGroup,
             allowDepress: false,
             pressed: false,
             tooltip: OpenLayers.i18n("Edit Feature"),
             // check item options
-            group: this.map.id,
+            group: this.toggleGroup,
             checked: false
         };
 
@@ -427,12 +439,12 @@
                 control: control,
                 map: this.map,
                 // button options
-                toggleGroup: this.map.id,
+                toggleGroup: this.toggleGroup,
                 allowDepress: false,
                 pressed: false,
                 tooltip: tooltip,
                 // check item options
-                group: this.map.id,
+                group: this.toggleGroup,
                 checked: false
             };
 



More information about the Commits mailing list