Remove source load events

This commit is contained in:
Tom Payne
2013-09-20 13:37:40 +01:00
parent 56e352b7aa
commit bd81e6c9a9
3 changed files with 1 additions and 32 deletions

View File

@@ -31,23 +31,10 @@ ol.layer.Layer = function(options) {
goog.events.listen(this.source_, goog.events.EventType.CHANGE,
this.handleSourceChange_, false, this);
if (!this.source_.isReady()) {
goog.events.listenOnce(this.source_, goog.events.EventType.LOAD,
this.handleSourceLoad_, false, this);
}
};
goog.inherits(ol.layer.Layer, ol.layer.Base);
/**
* @private
*/
ol.layer.Layer.prototype.dispatchLoadEvent_ = function() {
this.dispatchEvent(goog.events.EventType.LOAD);
};
/**
* @inheritDoc
*/
@@ -89,14 +76,6 @@ ol.layer.Layer.prototype.handleSourceChange_ = function() {
};
/**
* @private
*/
ol.layer.Layer.prototype.handleSourceLoad_ = function() {
this.dispatchLoadEvent_();
};
/**
* @inheritDoc
*/

View File

@@ -78,8 +78,7 @@ ol.layer.Base = function(options) {
ol.Object.getChangeEventType(ol.layer.LayerProperty.OPACITY),
ol.Object.getChangeEventType(ol.layer.LayerProperty.SATURATION),
ol.Object.getChangeEventType(ol.layer.LayerProperty.MAX_RESOLUTION),
ol.Object.getChangeEventType(ol.layer.LayerProperty.MIN_RESOLUTION),
goog.events.EventType.LOAD
ol.Object.getChangeEventType(ol.layer.LayerProperty.MIN_RESOLUTION)
],
this.handleLayerChange, false, this);

View File

@@ -64,15 +64,6 @@ ol.source.Source.prototype.dispatchChangeEvent = function() {
};
/**
* @protected
*/
ol.source.Source.prototype.dispatchLoadEvent = function() {
++this.revision_;
this.dispatchEvent(goog.events.EventType.LOAD);
};
/**
* @return {Array.<ol.Attribution>} Attributions.
*/