From dbb26dc68dddafe862fc7249c81bf7e0f5cdb7bb Mon Sep 17 00:00:00 2001 From: Tom Payne Date: Sat, 14 Jul 2012 17:46:50 +0200 Subject: [PATCH] Add ol.Camera.isFullyDefined --- src/ol/camera.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ol/camera.js b/src/ol/camera.js index b8a69d0e1c..1e3414a39d 100644 --- a/src/ol/camera.js +++ b/src/ol/camera.js @@ -53,6 +53,15 @@ ol.Camera.prototype.getRotation = function() { }; +/** + * @return {boolean} Is fully defined. + */ +ol.Camera.prototype.isFullyDefined = function() { + return goog.isDef(this.getPosition()) && goog.isDef(this.getResolution()) && + goog.isDef(this.getRotation()); +}; + + /** * @param {goog.math.Coordinate} position Position. */