Use inherited dispatchChangeEvent and getRevision in ol.source.Source
This commit is contained in:
@@ -74,25 +74,10 @@ ol.source.Source = function(options) {
|
||||
this.state_ = goog.isDef(options.state) ?
|
||||
options.state : ol.source.State.READY;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
*/
|
||||
this.revision_ = 0;
|
||||
|
||||
};
|
||||
goog.inherits(ol.source.Source, ol.Observable);
|
||||
|
||||
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
ol.source.Source.prototype.dispatchChangeEvent = function() {
|
||||
++this.revision_;
|
||||
this.dispatchEvent(goog.events.EventType.CHANGE);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @param {number} resolution Resolution.
|
||||
@@ -144,14 +129,6 @@ ol.source.Source.prototype.getProjection = function() {
|
||||
ol.source.Source.prototype.getResolutions = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @return {number} Revision.
|
||||
*/
|
||||
ol.source.Source.prototype.getRevision = function() {
|
||||
return this.revision_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.source.State} State.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user