From ad099d337eb51b7c3e1ca0010903cfe199d27713 Mon Sep 17 00:00:00 2001 From: Wingy Date: Fri, 4 Oct 2019 16:41:18 -0400 Subject: [PATCH] add backgroundColor option --- MMM-BackgroundSlideshow.js | 5 ++++- README.md | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/MMM-BackgroundSlideshow.js b/MMM-BackgroundSlideshow.js index 49b336fe..ccbe39d0 100755 --- a/MMM-BackgroundSlideshow.js +++ b/MMM-BackgroundSlideshow.js @@ -47,7 +47,9 @@ Module.register('MMM-BackgroundSlideshow', { 'rgba(0, 0, 0, 0.75) 100%' ], // the direction the gradient goes, vertical or horizontal - gradientDirection: 'vertical' + gradientDirection: 'vertical', + // Background behind background image + backgroundColor: 'black' }, // load function start: function() { @@ -163,6 +165,7 @@ Module.register('MMM-BackgroundSlideshow', { var div = document.createElement('div'); div.id = name + this.identifier; div.style.backgroundSize = this.config.backgroundSize; + div.style.backgroundColor = this.config.backgroundColor; div.style.transition = 'opacity ' + this.config.transitionSpeed + ' ease-in-out'; div.className = 'backgroundSlideShow'; diff --git a/README.md b/README.md index eed6ad39..69f856f3 100644 --- a/README.md +++ b/README.md @@ -213,5 +213,13 @@ The following properties can be configured:
This value is OPTIONAL + + backgroundColor + Background behind background image
+
Example: 'lightblue' +
Default value: 'black' +
This value is OPTIONAL + +