diff --git a/MMM-ImageSlideshow.js b/MMM-ImageSlideshow.js index ca1dbd5..3efc8f7 100644 --- a/MMM-ImageSlideshow.js +++ b/MMM-ImageSlideshow.js @@ -34,6 +34,8 @@ Module.register("MMM-ImageSlideshow", { validImageFileExtensions: 'bmp,jpg,gif,png', // a delay timer after all images have been shown, to wait to restart (in ms) delayUntilRestart: 0, + //opacity of the image + opacity: 1.0 }, // load function start: function () { @@ -141,6 +143,9 @@ Module.register("MMM-ImageSlideshow", { styleString += 'width:' + this.config.fixedImageWidth + 'px;'; if (this.config.fixedImageHeight != 0) styleString += 'height:' + this.config.fixedImageHeight + 'px;'; + // if opacity of image changed + if(this.config.opacity != 1.0) + styleString += 'opacity:' + this.config.opacity; // if style string has antyhing, set it if (styleString != '') image.style = styleString; diff --git a/README.md b/README.md index 706eb75..9c68463 100644 --- a/README.md +++ b/README.md @@ -111,5 +111,13 @@ The following properties can be configured:
This value is OPTIONAL + + opacity + Opacity of the image. Ranged 0.0 to 1.0.
+
Example: 0.5 +
Default value: 1.0 +
This value is OPTIONAL + +