Correct camera property change handling
This commit is contained in:
@@ -192,10 +192,12 @@ ol.Map.prototype.handleCameraChanged = function() {
|
||||
this.cameraListenerKeys_ = goog.array.map(
|
||||
goog.object.getValues(ol.CameraProperty),
|
||||
function(cameraProperty) {
|
||||
return goog.events.listen(camera, cameraProperty,
|
||||
return goog.events.listen(camera,
|
||||
ol.Object.getChangedEventType(cameraProperty),
|
||||
this.handleCameraPropertyChanged, false, this);
|
||||
},
|
||||
this);
|
||||
this.handleCameraPropertyChanged();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ ol.webgl.Map.prototype.getGL = function() {
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.webgl.Map.prototype.handleCameraPropertyChanged = function() {
|
||||
goog.base(this, 'handleCameraPropertyChanged');
|
||||
this.redraw_();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user