Change ol.Object event name syntax
'changed' to 'change' and '<attribute>_changed' to 'change:<attribute>'.
This commit is contained in:
@@ -307,13 +307,13 @@ ol.Map = function(options) {
|
||||
*/
|
||||
this.layersListenerKeys_ = null;
|
||||
|
||||
goog.events.listen(this, ol.Object.getChangedEventType(ol.MapProperty.LAYERS),
|
||||
goog.events.listen(this, ol.Object.getChangeEventType(ol.MapProperty.LAYERS),
|
||||
this.handleLayersChanged_, false, this);
|
||||
goog.events.listen(this, ol.Object.getChangedEventType(ol.MapProperty.VIEW),
|
||||
goog.events.listen(this, ol.Object.getChangeEventType(ol.MapProperty.VIEW),
|
||||
this.handleViewChanged_, false, this);
|
||||
goog.events.listen(this, ol.Object.getChangedEventType(ol.MapProperty.SIZE),
|
||||
goog.events.listen(this, ol.Object.getChangeEventType(ol.MapProperty.SIZE),
|
||||
this.handleSizeChanged_, false, this);
|
||||
goog.events.listen(this, ol.Object.getChangedEventType(ol.MapProperty.TARGET),
|
||||
goog.events.listen(this, ol.Object.getChangeEventType(ol.MapProperty.TARGET),
|
||||
this.handleTargetChanged_, false, this);
|
||||
|
||||
// setValues will trigger the rendering of the map if the map
|
||||
@@ -727,7 +727,7 @@ ol.Map.prototype.handleViewChanged_ = function() {
|
||||
var view = this.getView();
|
||||
if (goog.isDefAndNotNull(view)) {
|
||||
this.viewPropertyListenerKey_ = goog.events.listen(
|
||||
view, ol.ObjectEventType.CHANGED,
|
||||
view, ol.ObjectEventType.CHANGE,
|
||||
this.handleViewPropertyChanged_, false, this);
|
||||
}
|
||||
this.render();
|
||||
|
||||
Reference in New Issue
Block a user