as universally approved on discussions on dev list, replace new Array() with []. all tests pass ff & ie6
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3815 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -121,8 +121,8 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
|
||||
this.displayError();
|
||||
}
|
||||
|
||||
this.features = new Array();
|
||||
this.selectedFeatures = new Array();
|
||||
this.features = [];
|
||||
this.selectedFeatures = [];
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -310,7 +310,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, {
|
||||
* Destroy all features on the layer and empty the selected features array.
|
||||
*/
|
||||
destroyFeatures: function () {
|
||||
this.selectedFeatures = new Array();
|
||||
this.selectedFeatures = [];
|
||||
for (var i = this.features.length - 1; i >= 0; i--) {
|
||||
this.features[i].destroy();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user