fix ol.geom.geometry api tests

This commit is contained in:
Éric Lemoine
2012-06-22 13:11:29 +02:00
parent 8d36dfe475
commit e78b990f52
3 changed files with 27 additions and 18 deletions

View File

@@ -10,3 +10,17 @@ ol.geom.geometry = function(){
var g = new ol.geom.Geometry();
return g;
};
/**
* @export
* @param {ol.Bounds=} opt_arg new Bounds.
* @return {ol.geom.Geometry|ol.Bounds|undefined} either a Geometry (when used as
* setter) or a Bounds/undefined (if used as getter).
*/
ol.geom.Geometry.prototype.bounds = function(opt_arg) {
if (arguments.length == 1 && goog.isDef(opt_arg)) {
return this.setBounds(opt_arg);
} else {
return this.getBounds();
}
};