Change ol.source.Vector#removeFeatureInternal from private to protected

This commit is contained in:
Tom Payne
2013-12-19 13:25:48 +01:00
parent 3af6521ee3
commit f1fac356dd
+5 -4
View File
@@ -128,7 +128,7 @@ ol.source.Vector.prototype.addFeaturesInternal = function(features) {
* FIXME empty description for jsdoc * FIXME empty description for jsdoc
*/ */
ol.source.Vector.prototype.clear = function() { ol.source.Vector.prototype.clear = function() {
this.rBush_.forEach(this.removeFeatureInternal_, this); this.rBush_.forEach(this.removeFeatureInternal, this);
this.rBush_.clear(); this.rBush_.clear();
this.dispatchChangeEvent(); this.dispatchChangeEvent();
}; };
@@ -297,16 +297,17 @@ ol.source.Vector.prototype.removeFeature = function(feature) {
} else { } else {
this.rBush_.remove(feature); this.rBush_.remove(feature);
} }
this.removeFeatureInternal_(feature); this.removeFeatureInternal(feature);
this.dispatchChangeEvent(); this.dispatchChangeEvent();
}; };
/** /**
* Remove feature without firing a `change` event.
* @param {ol.Feature} feature Feature. * @param {ol.Feature} feature Feature.
* @private * @protected
*/ */
ol.source.Vector.prototype.removeFeatureInternal_ = function(feature) { ol.source.Vector.prototype.removeFeatureInternal = function(feature) {
var featureKey = goog.getUid(feature) + ''; var featureKey = goog.getUid(feature) + '';
goog.asserts.assert(featureKey in this.featureChangeKeys_); goog.asserts.assert(featureKey in this.featureChangeKeys_);
goog.events.unlistenByKey(this.featureChangeKeys_[featureKey]); goog.events.unlistenByKey(this.featureChangeKeys_[featureKey]);