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

@@ -36,7 +36,9 @@ ol.loc = function(loc) {
} }
} }
} }
} else if (goog.isObject(loc)) { }
else
if (goog.isObject(loc)) {
if (goog.isDef(loc.x)) { if (goog.isDef(loc.x)) {
x = loc.x; x = loc.x;
} }
@@ -49,7 +51,8 @@ ol.loc = function(loc) {
if (goog.isDef(loc.projection)) { if (goog.isDef(loc.projection)) {
projection = loc.projection; projection = loc.projection;
} }
} else { }
else {
throw new Error('ol.loc'); throw new Error('ol.loc');
} }
@@ -66,7 +69,8 @@ ol.loc = function(loc) {
ol.Loc.prototype.projection = function(opt_arg){ ol.Loc.prototype.projection = function(opt_arg){
if (arguments.length == 1 && goog.isDef(opt_arg)) { if (arguments.length == 1 && goog.isDef(opt_arg)) {
return this.setProjection(opt_arg); return this.setProjection(opt_arg);
} else { }
else {
return this.getProjection(); return this.getProjection();
} }
}; };
@@ -80,7 +84,8 @@ ol.Loc.prototype.projection = function(opt_arg) {
ol.Loc.prototype.x = function(opt_arg){ ol.Loc.prototype.x = function(opt_arg){
if (arguments.length == 1 && goog.isDef(opt_arg)) { if (arguments.length == 1 && goog.isDef(opt_arg)) {
return this.setX(opt_arg); return this.setX(opt_arg);
} else { }
else {
return this.getX(); return this.getX();
} }
}; };
@@ -94,7 +99,8 @@ ol.Loc.prototype.x = function(opt_arg) {
ol.Loc.prototype.y = function(opt_arg){ ol.Loc.prototype.y = function(opt_arg){
if (arguments.length == 1 && goog.isDef(opt_arg)) { if (arguments.length == 1 && goog.isDef(opt_arg)) {
return this.setY(opt_arg); return this.setY(opt_arg);
} else { }
else {
return this.getY(); return this.getY();
} }
}; };
@@ -108,7 +114,8 @@ ol.Loc.prototype.y = function(opt_arg) {
ol.Loc.prototype.z = function(opt_arg){ ol.Loc.prototype.z = function(opt_arg){
if (arguments.length == 1 && goog.isDef(opt_arg)) { if (arguments.length == 1 && goog.isDef(opt_arg)) {
return this.setZ(opt_arg); return this.setZ(opt_arg);
} else { }
else {
return this.getZ(); return this.getZ();
} }
}; };

View File

@@ -25,7 +25,9 @@ ol.map = function(opt_arg) {
if (arguments.length == 1) { if (arguments.length == 1) {
if (opt_arg instanceof ol.Map) { if (opt_arg instanceof ol.Map) {
return opt_arg; return opt_arg;
} else if (goog.isObject(opt_arg)) { }
else
if (goog.isObject(opt_arg)) {
var config = opt_arg; var config = opt_arg;
if (goog.isDef(config.center)) { if (goog.isDef(config.center)) {
center = ol.loc(config.center); center = ol.loc(config.center);
@@ -33,7 +35,8 @@ ol.map = function(opt_arg) {
if (goog.isDef(config.target)) { if (goog.isDef(config.target)) {
target = config.target; target = config.target;
} }
} else { }
else {
throw new Error('ol.map'); throw new Error('ol.map');
} }
} }

View File

@@ -19,9 +19,12 @@ ol.projection = function(opt_arg) {
if (arguments.length == 1) { if (arguments.length == 1) {
if (opt_arg instanceof ol.Projection) { if (opt_arg instanceof ol.Projection) {
return opt_arg; return opt_arg;
} else if (goog.isString(arguments[0])) { }
else
if (goog.isString(arguments[0])) {
code = arguments[0]; code = arguments[0];
} else { }
else {
throw new Error('ol.projection'); throw new Error('ol.projection');
} }
} }
@@ -37,7 +40,8 @@ ol.projection = function(opt_arg) {
ol.Projection.prototype.code = function(opt_code){ ol.Projection.prototype.code = function(opt_code){
if (goog.isDef(opt_code)) { if (goog.isDef(opt_code)) {
return this.setCode(opt_code); return this.setCode(opt_code);
} else { }
else {
return this.getCode(); return this.getCode();
} }
}; };