don't redeclare vars; fix semicolons

This commit is contained in:
rolux 2014-08-19 10:18:56 +02:00
parent 9f2dc33124
commit 4fbfc139b4
3 changed files with 16 additions and 16 deletions

View file

@ -155,7 +155,7 @@ Ox.$ = Ox.element = function(value) {
if (arguments.length == 0) {
ret = data;
} else if (arguments.length == 1 && Ox.isString(arguments[0])) {
ret = data[arguments[0]]
ret = data[arguments[0]];
} else {
Ox.forEach(Ox.makeObject(arguments), function(value, key) {
data[key] = value;
@ -249,7 +249,7 @@ Ox.$ = Ox.element = function(value) {
nextAll: function() {
var sibling = this[0], siblings = [];
while (true) {
var sibling = sibling.nextSibling;
sibling = sibling.nextSibling;
if (!sibling) {
break;
}
@ -323,7 +323,7 @@ Ox.$ = Ox.element = function(value) {
parents: function() {
var parent = this[0], parents = [];
while (true) {
var parent = parent.parentNode;
parent = parent.parentNode;
if (!parent) {
break;
}
@ -367,7 +367,7 @@ Ox.$ = Ox.element = function(value) {
prevAll: function() {
var sibling = this[0], siblings = [];
while (true) {
var sibling = sibling.previousSibling;
sibling = sibling.previousSibling;
if (!sibling) {
break;
}

View file

@ -123,7 +123,7 @@ Ox.once = function(fn) {
return function() {
if (!once) {
once = true;
fn.apply(null, args);
fn.apply(null, arguments);
}
};
};
@ -140,8 +140,8 @@ Ox.queue <f> Queue of asynchronous function calls with cached results
maxThreads <n|10> Number of parallel function calls
@*/
Ox.queue = function(fn, maxThreads) {
var maxThreads = maxThreads || 10,
processing = [],
maxThreads = maxThreads || 10;
var processing = [],
queued = [],
ret = Ox.cache(function() {
var args = Ox.slice(arguments);
@ -214,7 +214,7 @@ Ox.throttle = function(fn, ms) {
}
timeout = null;
}, ms);
};
}
};
};

View file

@ -85,9 +85,9 @@
90
@*/
Ox.getBearing = function(pointA, pointB) {
var pointA = rad(pointA),
pointB = rad(pointB),
x = Math.cos(pointA.lat) * Math.sin(pointB.lat)
pointA = rad(pointA);
pointB = rad(pointB);
var x = Math.cos(pointA.lat) * Math.sin(pointB.lat)
- Math.sin(pointA.lat) * Math.cos(pointB.lat)
* Math.cos(pointB.lng - pointA.lng),
y = Math.sin(pointB.lng - pointA.lng)
@ -107,9 +107,9 @@
{lat: 0, lng: 0}
@*/
Ox.getCenter = function(pointA, pointB) {
var pointA = rad(pointA),
pointB = rad(pointB),
x = Math.cos(pointB.lat)
pointA = rad(pointA);
pointB = rad(pointB);
var x = Math.cos(pointB.lat)
* Math.cos(pointB.lng - pointA.lng),
y = Math.cos(pointB.lat)
* Math.sin(pointB.lng - pointA.lng),
@ -159,7 +159,7 @@
Ox.EARTH_CIRCUMFERENCE
@*/
Ox.getDistance = function(pointA, pointB) {
var pointA = rad(pointA),
pointA = rad(pointA);
pointB = rad(pointB);
return Math.acos(
Math.sin(pointA.lat) * Math.sin(pointB.lat)