diff --git a/src/api/bounds.js b/src/api/bounds.js index 8031dd7ec9..eb87871275 100644 --- a/src/api/bounds.js +++ b/src/api/bounds.js @@ -61,7 +61,8 @@ ol.bounds = function(opt_arg){ */ ol.Bounds.prototype.projection = function(opt_arg){ if (arguments.length == 1 && goog.isDef(opt_arg)) { - return this.setProjection(opt_arg); + this.setProjection(opt_arg); + return this; } else { return this.getProjection(); @@ -76,7 +77,8 @@ ol.Bounds.prototype.projection = function(opt_arg){ */ ol.Bounds.prototype.minX = function(opt_arg){ if (arguments.length == 1 && goog.isDef(opt_arg)) { - return this.setMinX(opt_arg); + this.setMinX(opt_arg); + return this; } else { return this.getMinX(); @@ -91,7 +93,8 @@ ol.Bounds.prototype.minX = function(opt_arg){ */ ol.Bounds.prototype.minY = function(opt_arg){ if (arguments.length == 1 && goog.isDef(opt_arg)) { - return this.setMinY(opt_arg); + this.setMinY(opt_arg); + return this; } else { return this.getMinY(); @@ -106,7 +109,8 @@ ol.Bounds.prototype.minY = function(opt_arg){ */ ol.Bounds.prototype.maxX = function(opt_arg){ if (arguments.length == 1 && goog.isDef(opt_arg)) { - return this.setMaxX(opt_arg); + this.setMaxX(opt_arg); + return this; } else { return this.getMaxX(); @@ -121,7 +125,8 @@ ol.Bounds.prototype.maxX = function(opt_arg){ */ ol.Bounds.prototype.maxY = function(opt_arg){ if (arguments.length == 1 && goog.isDef(opt_arg)) { - return this.setMaxY(opt_arg); + this.setMaxY(opt_arg); + return this; } else { return this.getMaxY(); diff --git a/src/api/loc.js b/src/api/loc.js index 3afe6d6cd2..0a8ce222ea 100644 --- a/src/api/loc.js +++ b/src/api/loc.js @@ -75,7 +75,8 @@ ol.Loc.prototype.projection = function(opt_arg){ */ ol.Loc.prototype.x = function(opt_arg){ if (arguments.length == 1 && goog.isDef(opt_arg)) { - return this.setX(opt_arg); + this.setX(opt_arg); + return this; } else { return this.getX(); @@ -90,7 +91,8 @@ ol.Loc.prototype.x = function(opt_arg){ */ ol.Loc.prototype.y = function(opt_arg){ if (arguments.length == 1 && goog.isDef(opt_arg)) { - return this.setY(opt_arg); + this.setY(opt_arg); + return this; } else { return this.getY(); diff --git a/src/api/projection.js b/src/api/projection.js index 085d98022c..27bf1254e4 100644 --- a/src/api/projection.js +++ b/src/api/projection.js @@ -52,7 +52,8 @@ ol.projection = function(opt_arg){ */ ol.Projection.prototype.code = function(opt_code){ if (arguments.length == 1 && goog.isDef(opt_code)) { - return this.setCode(opt_code); + this.setCode(opt_code); + return this; } else { return this.getCode(); diff --git a/src/ol/Bounds.js b/src/ol/Bounds.js index dafc0f2b7c..5c4ac1fdc7 100644 --- a/src/ol/Bounds.js +++ b/src/ol/Bounds.js @@ -46,42 +46,6 @@ ol.Bounds = function(minX, minY, maxX, maxY, opt_projection) { }; goog.inherits(ol.Bounds, ol.UnreferencedBounds); -/** - * @param {number} minX Minimum X. - * @return {!ol.Bounds} This. - */ -ol.Bounds.prototype.setMinX = function(minX) { - this.minX_ = minX; - return this; -}; - -/** - * @param {number} maxX Maximum X. - * @return {!ol.Bounds} This. - */ -ol.Bounds.prototype.setMaxX = function(maxX) { - this.maxX_ = maxX; - return this; -}; - -/** - * @param {number} minY Minimum Y. - * @return {!ol.Bounds} This. - */ -ol.Bounds.prototype.setMinY = function(minY) { - this.minY_ = minY; - return this; -}; - -/** - * @param {number} maxY Maximum Y. - * @return {!ol.Bounds} This. - */ -ol.Bounds.prototype.setMaxY = function(maxY) { - this.maxY_ = maxY; - return this; -}; - /** * @return {ol.Projection|undefined} Projection. */ @@ -91,9 +55,7 @@ ol.Bounds.prototype.getProjection = function() { /** * @param {ol.Projection|undefined} projection Projection. - * @return {ol.Bounds} This. */ ol.Bounds.prototype.setProjection = function(projection) { this.projection_ = projection; - return this; }; diff --git a/src/ol/Loc.js b/src/ol/Loc.js index 3be2afc7ac..4c2cd77724 100644 --- a/src/ol/Loc.js +++ b/src/ol/Loc.js @@ -74,41 +74,33 @@ ol.Loc.prototype.getZ = function() { /** * @param {ol.Projection|undefined} projection Projection. - * @return {ol.Loc} This. */ ol.Loc.prototype.setProjection = function(projection) { this.projection_ = projection; - return this; }; /** * @param {number} x X. - * @return {ol.Loc} This. */ ol.Loc.prototype.setX = function(x) { this.x_ = x; - return this; }; /** * @param {number} y Y. - * @return {ol.Loc} This. */ ol.Loc.prototype.setY = function(y) { this.y_ = y; - return this; }; /** * @param {number|undefined} z Z. - * @return {ol.Loc} This. */ ol.Loc.prototype.setZ = function(z) { this.z_ = z; - return this; }; /** diff --git a/src/ol/Projection.js b/src/ol/Projection.js index a4fab80524..4ab65df88e 100644 --- a/src/ol/Projection.js +++ b/src/ol/Projection.js @@ -43,11 +43,9 @@ ol.Projection.prototype.getCode = function() { /** * @param {string} code Code. - * @return {!ol.Projection} This. */ ol.Projection.prototype.setCode = function(code) { this.code_ = code; - return this; }; /** @@ -59,11 +57,9 @@ ol.Projection.prototype.getUnits = function() { /** * @param {string} units Units abbreviation. - * @return {!ol.Projection} This. */ ol.Projection.prototype.setUnits = function(units) { this.units_ = units; - return this; }; /** @@ -77,11 +73,9 @@ ol.Projection.prototype.getExtent = function() { /** * @param {!ol.UnreferencedBounds} extent Validity extent. - * @return {ol.Projection} This. */ ol.Projection.prototype.setExtent = function(extent) { this.extent_ = extent; - return this; }; /** diff --git a/src/ol/UnreferencedBounds.js b/src/ol/UnreferencedBounds.js index f4688d503d..9b90527c18 100644 --- a/src/ol/UnreferencedBounds.js +++ b/src/ol/UnreferencedBounds.js @@ -45,11 +45,9 @@ ol.UnreferencedBounds.prototype.getMinX = function() { /** * @param {number} minX Minimum X. - * @return {ol.UnreferencedBounds} This. */ ol.UnreferencedBounds.prototype.setMinX = function(minX) { this.minX_ = minX; - return this; }; /** @@ -61,11 +59,9 @@ ol.UnreferencedBounds.prototype.getMinY = function() { /** * @param {number} minY Minimum Y. - * @return {ol.UnreferencedBounds} This. */ ol.UnreferencedBounds.prototype.setMinY = function(minY) { this.minY_ = minY; - return this; }; /** @@ -77,11 +73,9 @@ ol.UnreferencedBounds.prototype.getMaxX = function() { /** * @param {number} maxX Maximum X. - * @return {ol.UnreferencedBounds} This. */ ol.UnreferencedBounds.prototype.setMaxX = function(maxX) { this.maxX_ = maxX; - return this; }; /** @@ -93,10 +87,8 @@ ol.UnreferencedBounds.prototype.getMaxY = function() { /** * @param {number} maxY Maximum Y. - * @return {ol.UnreferencedBounds} This. */ ol.UnreferencedBounds.prototype.setMaxY = function(maxY) { this.maxY_ = maxY; - return this; };