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