change indentation.

This commit is contained in:
Marc Jansen
2012-06-19 10:56:01 +02:00
parent a6fa08550f
commit b1e26fab1d
4 changed files with 151 additions and 137 deletions

View File

@@ -14,18 +14,21 @@ ol.ProjectionLike;
* @param {ol.ProjectionLike=} opt_arg Argument.
* @return {ol.Projection} Projection.
*/
ol.projection = function(opt_arg) {
var code;
if (arguments.length == 1) {
if (opt_arg instanceof ol.Projection) {
return opt_arg;
} else if (goog.isString(arguments[0])) {
code = arguments[0];
} else {
throw new Error('ol.projection');
ol.projection = function(opt_arg){
var code;
if (arguments.length == 1) {
if (opt_arg instanceof ol.Projection) {
return opt_arg;
}
else
if (goog.isString(arguments[0])) {
code = arguments[0];
}
else {
throw new Error('ol.projection');
}
}
}
return new ol.Projection(code);
return new ol.Projection(code);
};
@@ -34,10 +37,11 @@ ol.projection = function(opt_arg) {
* @param {string=} opt_code Code.
* @return {ol.Projection|string} Result.
*/
ol.Projection.prototype.code = function(opt_code) {
if (goog.isDef(opt_code)) {
return this.setCode(opt_code);
} else {
return this.getCode();
}
ol.Projection.prototype.code = function(opt_code){
if (goog.isDef(opt_code)) {
return this.setCode(opt_code);
}
else {
return this.getCode();
}
};