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:
parent
8c67bf9462
commit
17aca54e7a
5 changed files with 57 additions and 50 deletions
|
|
@ -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);
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue