keep images in cache

This commit is contained in:
j 2011-04-23 01:12:04 +02:00
parent 840eadf914
commit 0d5de4332f

View file

@ -157,6 +157,7 @@
warning: '\u26A0', warning: '\u26A0',
white_star: '\u2606' white_star: '\u2606'
}; };
Ox.IMAGE_CACHE = [];
$.getJSON(Ox.UI.PATH + 'json/OxUI.json', function(data) { $.getJSON(Ox.UI.PATH + 'json/OxUI.json', function(data) {
function loadImage(src) { function loadImage(src) {
@ -166,6 +167,7 @@
dfd.resolve(); dfd.resolve();
}; };
image.src = Ox.UI.PATH + src; image.src = Ox.UI.PATH + src;
Ox.IMAGE_CACHE.push(src);
return dfd.promise(); return dfd.promise();
} }