Remove source load events
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user