frdteknikelektro / MMM-SimpleLogo

MagicMirror Modules Simple Logo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"text" config property not in documentation

misterbastean opened this issue · comments

The "text" property is not in the docs. This results in it defaulting to "Simple Logo", which is displayed above the icon.

I suggest adding this to the config options documentation, as well as implementing an option to not have it display at all.

Yes, it's simple to just comment out the line in the code that adds it to the DOM, but some users may struggle figuring this out.

For anyone else who sees this thread, in the mean time you can remove the "simple logo" by:

  1. Navigate through your folders to /home/pi/MagicMirror/modules/MMM-SimpleLogo
  2. Open MMM-SimpleLogo.js
  3. The 4th line is...

text: "Simple Logo",

...delete the words in the quotation marks or add words you would prefer, such as "Magic Mirror"

@Jacobphilli You can do that, which will work 99% of the time. Just be aware that there will still be an empty string added to the DOM, which may or may not cause issues, depending on custom CSS or other modules that interact with this one.

I would suggest commenting out lines 39 & 40:

// var text = document.createTextNode(this.config.text);
// wrapper.appendChild(text);

This would make it so that they are never even added to the wrapper, ensuring they don't introduce any inconsistencies.

As for a solution in future updates, I would suggest not setting a default "text" value, then adding an if statement to conditionally render the "text" element only if the user supplies some text in the config.

Thank you @jonsger . hope this will help anyone