Draw and modify controls now set feature state. No longer do we need to check feature state in app code in cases where features are created or modified with these controls. r=elemoine,ahocevar (closes #1833)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@8382 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -77,6 +77,7 @@ OpenLayers.Control.DrawFeature = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
drawFeature: function(geometry) {
|
||||
var feature = new OpenLayers.Feature.Vector(geometry);
|
||||
feature.state = OpenLayers.State.INSERT;
|
||||
this.layer.addFeatures([feature]);
|
||||
this.featureAdded(feature);
|
||||
this.events.triggerEvent("featureadded",{feature : feature});
|
||||
|
||||
Reference in New Issue
Block a user