mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 16:46:31 +00:00
Added fade-in for images
This commit is contained in:
parent
fe06f6d8ff
commit
78c32035f8
@ -205,6 +205,12 @@ main {
|
||||
#game-grid .mdl-card img {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
opacity: 0;
|
||||
transition: opacity .3s;
|
||||
z-index: -1;
|
||||
}
|
||||
#game-grid .mdl-card img.fade-in {
|
||||
opacity: 1;
|
||||
}
|
||||
#game-grid .game-title {
|
||||
position: absolute;
|
||||
|
@ -537,11 +537,10 @@ function showApps(host) {
|
||||
}
|
||||
host.getBoxArt(app.id).then(function(resolvedPromise) {
|
||||
// put the box art into the image holder
|
||||
$(outerDiv).append($("<img \>", {
|
||||
src: resolvedPromise,
|
||||
name: app.title
|
||||
}));
|
||||
|
||||
var img = new Image();
|
||||
img.src = resolvedPromise;
|
||||
img.onload = e => img.classList.add('fade-in');
|
||||
$(outerDiv).append(img);
|
||||
}, function(failedPromise) {
|
||||
console.log('%c[index.js, showApps]', 'color: green;', 'Error! Failed to retrieve box art for app ID: ' + app.id + '. Returned value was: ' + failedPromise, '\n Host object:', host, host.toString());
|
||||
$(outerDiv).append($("<img \>", {
|
||||
|
Loading…
x
Reference in New Issue
Block a user