use Ox.break
This commit is contained in:
parent
3d4a79b6a2
commit
04784630d3
42 changed files with 117 additions and 118 deletions
|
|
@ -113,7 +113,7 @@ Ox.ListMap = function(options, self) {
|
|||
if (data.area >= area) {
|
||||
iconSize = size;
|
||||
} else {
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return data.type
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ Ox.MapMarker = function(options) {
|
|||
if (that.place.area >= area) {
|
||||
that.size = size;
|
||||
} else {
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
} else if (Ox.isNumber(size)) {
|
||||
|
|
|
|||
|
|
@ -151,7 +151,6 @@ Ox.MapPlace = function(options) {
|
|||
options = Ox.makeObject(arguments);
|
||||
Ox.forEach(options, function(value, key) {
|
||||
that[key] = value;
|
||||
Ox.Log('Map', 'that.' + key, '=', value, '......')
|
||||
});
|
||||
update(true);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue