1
0
Fork 0
forked from 0x2620/oxjs

use Ox.break

This commit is contained in:
rolux 2012-05-22 09:11:26 +02:00
commit 04784630d3
42 changed files with 117 additions and 118 deletions

View file

@ -543,7 +543,7 @@ Ox.Map = function(options, self) {
if (place.bounds.equals(p.bounds)) {
place = p;
exists = true;
return false;
Ox.break();
}
});
if (!exists) {
@ -737,7 +737,7 @@ Ox.Map = function(options, self) {
canContain(bounds, result.geometry.bounds || result.geometry.viewport)
) {
callback(new Ox.MapPlace(parseGeodata(results[i])));
return false;
Ox.break();
}
});
} else {
@ -786,7 +786,7 @@ Ox.Map = function(options, self) {
Ox.forEach(self.options.places, function(place, i) {
if (place.name == name) {
position = i;
return false;
Ox.break();
}
});
return position;
@ -802,7 +802,7 @@ Ox.Map = function(options, self) {
Ox.forEach(self.places, function(place) {
if (place.selected) {
id = place.id;
return false;
Ox.break();
}
});
}
@ -1037,7 +1037,7 @@ Ox.Map = function(options, self) {
Ox.forEach(components, function(component) {
if (component.types.indexOf('country') > -1) {
countryCode = component.short_name;
return false;
Ox.break();
}
});
return countryCode;
@ -1076,7 +1076,7 @@ Ox.Map = function(options, self) {
var ret;
Ox.forEach(types, function(v) {
ret = Ox.startsWith(v, type);
return !ret;
ret && Ox.break();
});
return ret;
}
@ -1084,10 +1084,10 @@ Ox.Map = function(options, self) {
Ox.forEach(values, function(value) {
if (find(value)) {
type = key;
return false;
Ox.break();
}
});
return type == 'feature';
type != 'feature' && Ox.break();
});
return type;
}
@ -1243,7 +1243,7 @@ Ox.Map = function(options, self) {
.css({
width: (scaleWidth - 16) + 'px'
})
return false;
Ox.break();
}
});
}