Merge pull request #1563 from twpayne/revision-in-observable

Move dispatchChangeEvent and getRevision into ol.Observable
This commit is contained in:
Tom Payne
2014-01-21 07:04:10 -08:00
14 changed files with 51 additions and 105 deletions

View File

@@ -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.
*/