Add image preload
This commit is contained in:
@@ -52,7 +52,8 @@
|
||||
opt.value=element.defaultCss;
|
||||
cssOptions.appendChild(opt);
|
||||
});
|
||||
updateSelectors()
|
||||
updateSelectors();
|
||||
preloadPreviews();
|
||||
}
|
||||
|
||||
function loadOptions(skin){
|
||||
@@ -78,6 +79,18 @@
|
||||
$('#options', page).html(html).trigger('create');
|
||||
}
|
||||
|
||||
function preloadPreviews(){
|
||||
data.forEach(skin => {
|
||||
if(skin.previews != undefined){
|
||||
skin.previews.forEach(img => {
|
||||
var image = new Image();
|
||||
image.src = img.url;
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function loadPreviews(skin){
|
||||
if(skin.previews == undefined){
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user