large scale syntactic clean up adding missing semi-colons and curly braces around blocks.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@5002 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -117,7 +117,9 @@ OpenLayers.Util.clearArray = function(array) {
|
||||
OpenLayers.Util.indexOf = function(array, obj) {
|
||||
|
||||
for(var i=0; i < array.length; i++) {
|
||||
if (array[i] == obj) return i;
|
||||
if (array[i] == obj) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
@@ -293,7 +295,7 @@ OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,
|
||||
OpenLayers.Util.setOpacity = function(element, opacity) {
|
||||
OpenLayers.Util.modifyDOMElement(element, null, null, null,
|
||||
null, null, null, opacity);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: onImageLoad
|
||||
@@ -373,7 +375,7 @@ OpenLayers.Util.alphaHack = function() {
|
||||
|
||||
return ( filter &&
|
||||
(version >= 5.5) && (version < 7) );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: modifyAlphaImageDiv
|
||||
@@ -587,7 +589,7 @@ OpenLayers.Util.Try = function() {
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -681,10 +683,12 @@ OpenLayers.Util.getXmlNodeValue = function(node) {
|
||||
OpenLayers.Util.Try(
|
||||
function() {
|
||||
val = node.text;
|
||||
if (!val)
|
||||
if (!val) {
|
||||
val = node.textContent;
|
||||
if (!val)
|
||||
}
|
||||
if (!val) {
|
||||
val = node.firstChild.nodeValue;
|
||||
}
|
||||
},
|
||||
function() {
|
||||
val = node.textContent;
|
||||
@@ -747,7 +751,9 @@ OpenLayers.Util.distVincenty=function(p1, p2) {
|
||||
var sinLambda = Math.sin(lambda), cosLambda = Math.cos(lambda);
|
||||
var sinSigma = Math.sqrt((cosU2*sinLambda) * (cosU2*sinLambda) +
|
||||
(cosU1*sinU2-sinU1*cosU2*cosLambda) * (cosU1*sinU2-sinU1*cosU2*cosLambda));
|
||||
if (sinSigma==0) return 0; // co-incident points
|
||||
if (sinSigma==0) {
|
||||
return 0; // co-incident points
|
||||
}
|
||||
var cosSigma = sinU1*sinU2 + cosU1*cosU2*cosLambda;
|
||||
var sigma = Math.atan2(sinSigma, cosSigma);
|
||||
var alpha = Math.asin(cosU1 * cosU2 * sinLambda / sinSigma);
|
||||
@@ -758,7 +764,9 @@ OpenLayers.Util.distVincenty=function(p1, p2) {
|
||||
lambda = L + (1-C) * f * Math.sin(alpha) *
|
||||
(sigma + C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));
|
||||
}
|
||||
if (iterLimit==0) return NaN // formula failed to converge
|
||||
if (iterLimit==0) {
|
||||
return NaN; // formula failed to converge
|
||||
}
|
||||
var uSq = cosSqAlpha * (a*a - b*b) / (b*b);
|
||||
var A = 1 + uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));
|
||||
var B = uSq/1024 * (256+uSq*(-128+uSq*(74-47*uSq)));
|
||||
@@ -783,9 +791,9 @@ OpenLayers.Util.distVincenty=function(p1, p2) {
|
||||
* {Object} An object of key/value pairs from the query string.
|
||||
*/
|
||||
OpenLayers.Util.getParameters = function(url) {
|
||||
//if no url specified, take it from the location bar
|
||||
url = url || window.location.href
|
||||
if(url == null) {
|
||||
/* if no url specified, take it from the location bar */
|
||||
url = url || window.location.href;
|
||||
if (url == null) {
|
||||
url = window.location.href;
|
||||
}
|
||||
|
||||
@@ -980,7 +988,7 @@ OpenLayers.Util.safeStopPropagation = function(evt) {
|
||||
* Parameters:
|
||||
* forElement - {DOMElement}
|
||||
*
|
||||
* Returns:<EFBFBD>
|
||||
* Returns:´
|
||||
* {Array} two item array, L value then T value.
|
||||
*/
|
||||
OpenLayers.Util.pagePosition = function(forElement) {
|
||||
@@ -1184,7 +1192,7 @@ OpenLayers.Util.createUrlObject = function(url, options) {
|
||||
var index = relStr.indexOf("../");
|
||||
|
||||
if (index == 0) {
|
||||
backs++
|
||||
backs++;
|
||||
relStr = relStr.substr(3);
|
||||
} else if (index >= 0) {
|
||||
var prevChunk = relStr.substr(0,index - 1);
|
||||
|
||||
Reference in New Issue
Block a user