diff --git a/MMM-Wallpaper.css b/MMM-Wallpaper.css index f88e2a7..f228ddb 100644 --- a/MMM-Wallpaper.css +++ b/MMM-Wallpaper.css @@ -19,6 +19,7 @@ } .MMM-Wallpaper .crossfade-image { + position: absolute; transition: opacity 1s ease-in-out; } diff --git a/MMM-Wallpaper.js b/MMM-Wallpaper.js index 39c7d48..d6375e6 100644 --- a/MMM-Wallpaper.js +++ b/MMM-Wallpaper.js @@ -143,6 +143,13 @@ Module.register("MMM-Wallpaper", { element.style.opacity = 1; self.title.style.display = "none"; + if(self.config.crossfade){ + images = document.getElementsByClassName("crossfade-image") + if(images.length > 1 ){ + images[0].style.opacity = 0 + } + } + setTimeout(() => { var caption = imageData.caption; if (self.config.caption && caption) {