Rename ol.Observable#dispatchChangeEvent() to #changed()

Since dispatchChangeEvent does not only dispatch a change event, but
also increases the revision counter, the method name should reflect
this.
This commit is contained in:
Andreas Hocevar
2014-09-04 19:30:48 -06:00
parent 5de537001f
commit ebe3b48e0a
32 changed files with 66 additions and 66 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ goog.require('goog.events.EventType');
* instantiated in apps.
* An event target providing convenient methods for listener registration
* and unregistration. A generic `change` event is always available through
* {@link ol.Observable#dispatchChangeEvent}.
* {@link ol.Observable#changed}.
*
* @constructor
* @extends {goog.events.EventTarget}
@@ -35,11 +35,11 @@ goog.inherits(ol.Observable, goog.events.EventTarget);
/**
* Dispatches a `change` event.
* Increases the revision counter and disptches a 'change' event.
* @fires change
* @api
*/
ol.Observable.prototype.dispatchChangeEvent = function() {
ol.Observable.prototype.changed = function() {
++this.revision_;
this.dispatchEvent(goog.events.EventType.CHANGE);
};