Skip to content

Commit dd3eaa6

Browse files
Merge tag 'config-options' into develop
Patch config. thanks to @thelastredshirt config-options
2 parents bdf8eed + 155a1a8 commit dd3eaa6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

MMM-SimpleLogo.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Module.register("MMM-SimpleLogo", {
22
// Default module config.
33
defaults: {
44
text: "Simple Logo",
5-
fileUrl: config.fileUrl || "modules/MMM-SimpleLogo/public/logo.png",
6-
width: config.width || "200px",
7-
position: config.position || "left"
5+
fileUrl: "modules/MMM-SimpleLogo/public/logo.png",
6+
width: "200px",
7+
position: "left"
88
},
99

1010
getStyles: function () {
@@ -17,10 +17,10 @@ Module.register("MMM-SimpleLogo", {
1717
getDom: function() {
1818
var wrapper = document.createElement("div");
1919
wrapper.className = 'simple-logo__container';
20-
wrapper.classList.add(this.defaults.position);
21-
wrapper.style.width = this.defaults.width;
20+
wrapper.classList.add(this.config.position);
21+
wrapper.style.width = this.config.width;
2222
var img = document.createElement("img");
23-
img.setAttribute('src', this.defaults.fileUrl);
23+
img.setAttribute('src', this.config.fileUrl);
2424
wrapper.appendChild(img);
2525
return wrapper;
2626
}

0 commit comments

Comments
 (0)