-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Crossfade #87
base: master
Are you sure you want to change the base?
Fix Crossfade #87
Conversation
0a19c72
to
bd643c1
Compare
bd643c1
to
3230f0d
Compare
if(self.config.crossfade){ | ||
images = document.getElementsByClassName("crossfade-image") | ||
if(images.length > 1 ){ | ||
images[0].style.opacity = 0 | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should call this on self.wrapper
, as there may be multiple MMM-Wallpaper modules on the page, and one shouldn't affect the others. Also, should keep the formatting consistent with the rest of the file:
if(self.config.crossfade){ | |
images = document.getElementsByClassName("crossfade-image") | |
if(images.length > 1 ){ | |
images[0].style.opacity = 0 | |
} | |
} | |
if (self.config.crossfade) { | |
images = self.wrapper.getElementsByClassName("crossfade-image"); | |
if (images.length > 1) { | |
images[0].style.opacity = 0; | |
} | |
} |
@@ -19,6 +19,7 @@ | |||
} | |||
|
|||
.MMM-Wallpaper .crossfade-image { | |||
position: absolute; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this code and while it does fix the issues with the crossfade, this doesn't seem to work when the fillRegion param is set to false. I want the slideshow to play in a specific region of the magic mirror display; not the whole background, and setting the position to absolute overrides the width/height values I've set up in the config and it fills the whole region with a cropped image.
Had some issues with the crossfade feature. I made these small adjustments to resolve.