[Commits] r1720 - sandbox/redlining/ux/FeatureEditing/ux/widgets
commits at geoext.org
commits at geoext.org
Tue Jan 12 15:46:38 CET 2010
Author: adube
Date: 2010-01-12 15:46:38 +0100 (Tue, 12 Jan 2010)
New Revision: 1720
Modified:
sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js
Log:
DrawFeature auto reactivation after draw+edit
Modified: sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js
===================================================================
--- sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js 2010-01-12 14:40:43 UTC (rev 1719)
+++ sandbox/redlining/ux/FeatureEditing/ux/widgets/FeatureEditingControler.js 2010-01-12 14:46:38 UTC (rev 1720)
@@ -24,6 +24,12 @@
*/
drawControls: null,
+ /** api: config[lastDrawControl]
+ * ``OpenLayers.Control.DrawFeature``
+ * The last active draw control.
+ */
+ lastDrawControl: null,
+
/** api: config[deleteAllAction]
* ``Ext.Action``
* The action created to delete all features.
@@ -333,12 +339,13 @@
feature = event.feature;
feature.state = OpenLayers.State.INSERT;
- this.featureControl.activate();
-
drawControl = this.getActiveDrawControl();
if(drawControl) {
drawControl.deactivate();
+ this.lastDrawControl = drawControl;
}
+
+ this.featureControl.activate();
this.getSelectControl().select(feature);
},
@@ -394,6 +401,12 @@
onModificationEnd: function(event) {
var feature = (event.geometry) ? event : event.feature;
// or we could execute commits here also
+
+ if(this.lastDrawControl) {
+ this.featureControl.deactivate();
+ this.lastDrawControl.activate();
+ this.lastDrawControl = null;
+ }
},
/** private: method[onModificationEnd]
More information about the Commits
mailing list