Skip to content

Commit

Permalink
Fix Crossfade
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanLynnSmith committed Mar 30, 2023
1 parent 26bbb89 commit 3230f0d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions MMM-Wallpaper.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
}

.MMM-Wallpaper .crossfade-image {
position: absolute;
transition: opacity 1s ease-in-out;
}

Expand Down
7 changes: 7 additions & 0 deletions MMM-Wallpaper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3230f0d

Please sign in to comment.