1
0
Fork 0
forked from 0x2620/oxjs

temporary fix for video skipping bug (#716); add third parameter (index) to forEach callback; add Geo colors

This commit is contained in:
rlx 2012-03-25 21:23:03 +00:00
commit 17aca54e7a
5 changed files with 57 additions and 50 deletions

View file

@ -76,6 +76,45 @@ Ox.load.Geo = function(options, callback) {
@*/
Ox.COUNTRIES = data;
var colors = {
'North America': [0, 0, 255],
'Northern America': [0, 0, 255],
'South America': [0, 255, 0],
'Southern America': [0, 255, 0],
'Caribbean': [192, 255, 192],
'Central America': [0, 128, 0],
'Europe': [255, 255, 0],
'Western Europe': [255, 255, 0],
'Northern Europe': [255, 255, 192],
'Southern Europe': [128, 128, 0],
'Eastern Europe': [255, 192, 0],
'Africa': [255, 0, 255],
'Northern Africa': [255, 0, 255],
'Southern Africa': [255, 128, 255],
'Middle Africa': [128, 0, 128],
'Western Africa': [128, 0, 255],
'Eastern Africa': [255, 0, 128],
'Asia': [255, 0, 0],
'Eastern Asia': [255, 0, 0],
'South-Eastern Asia': [255, 128, 128],
'Southern Asia': [128, 0, 0],
'Western Asia': [255, 128, 0],
'Central Asia': [128, 64, 0],
'Oceania': [0, 255, 255],
'Australia and New Zealand': [0, 255, 255],
'Micronesia': [192, 255, 255],
'Melanesia': [0, 128, 128],
'Polynesia': [128, 128, 255],
'Antarctica': [128, 128, 128]
};
//@ Functions ----------------------------------------------------------
@ -176,6 +215,10 @@ Ox.load.Geo = function(options, callback) {
return Ox.PATH + 'Ox.Geo/png/flags/' + size + '/' + code + '.png';
};
Ox.getGeoColor = function(str) {
return colors[str] || [128, 128, 128];
};
callback(true);
});