properly cache Ox.UI.getImageURL
This commit is contained in:
parent
5466c7208c
commit
914d92f135
1 changed files with 8 additions and 2 deletions
|
@ -327,7 +327,7 @@ Ox.load.UI = function(options, callback) {
|
||||||
color <s|[n]> Color name or RGB values
|
color <s|[n]> Color name or RGB values
|
||||||
theme <s> Theme name
|
theme <s> Theme name
|
||||||
@*/
|
@*/
|
||||||
Ox.UI.getImageURL = function(name, color, theme) {
|
Ox.UI.getImageURL = Ox.cache(function(name, color, theme) {
|
||||||
var colorName,
|
var colorName,
|
||||||
image = images[name],
|
image = images[name],
|
||||||
themeData,
|
themeData,
|
||||||
|
@ -355,7 +355,13 @@ Ox.load.UI = function(options, callback) {
|
||||||
name: name, theme: theme
|
name: name, theme: theme
|
||||||
})) + '-->'
|
})) + '-->'
|
||||||
);
|
);
|
||||||
};
|
}, {
|
||||||
|
key: function(args) {
|
||||||
|
args[1] = args[1] || 'default';
|
||||||
|
args[2] = args[2] || Ox.Theme();
|
||||||
|
return JSON.stringify(args);
|
||||||
|
}
|
||||||
|
});
|
||||||
/*@
|
/*@
|
||||||
Ox.UI.getVideoFormat <f> Get supported video formats
|
Ox.UI.getVideoFormat <f> Get supported video formats
|
||||||
(formats) -> <a> of supported formats
|
(formats) -> <a> of supported formats
|
||||||
|
|
Loading…
Reference in a new issue