Ticket #2549 (closed bug: fixed)
Layer.Vector fires featuresadded event with shapes vetoed by beforefeatureadded
|Reported by:||timbonicus||Owned by:||crschmidt|
In OpenLayers.Layer.Vector#addFeatures, the beforefeatureadded event is fired allowing listeners to return false and veto adding the feature to the layer. The feature is still added to this.features in the class before this opportunity and fired with the featuresadded event at the end of the function.
The attached patch corrects this behavior and never adds the feature to this.features or fires it with the featuresadded event if the shape was vetoed.