MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Veldrovive
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    V
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 53
    • Groups 1

    Posts

    Recent Best Controversial
    • Is it possible to have custom information for each module in the config file?

      In order to improve the usability of my page system, I would like to be able to use a custom piece of information in the config file to define pages and positions for the Modules.

      {
          "module": "clock",
          "position": "top_right",
          "pages": {"pageName": "position"},
          "config": {}
      }
      

      However, it seems just using getModules.enumerate() doesn’t supply that new pages object.
      As a workaround, I noticed that the config for each module is given and so the page’s object could be stored inside that. However, for less confusing use, I would rather have it outside.
      The other option I would explore is simply importing the config into my node_helper and then parsing the config manually, but before I went ahead with the plan I wanted to see if there is some reason to refrain from that.

      Is there a correct way to do this? Is it correct to do this at all?

      posted in Development
      V
      Veldrovive
    • RE: Is there a way to programmatically change the position of a module

      I did it manually using references the modules and containers. It worked a lot better than I assumed it would as well since references to the modules seem to stay intact so hiding them still works. I will post the full module when I’m done if in case anybody wants to see how I hacked it together.

      P.S. If there is a more official way, I would still like to know what it is.

      posted in Development
      V
      Veldrovive
    • Is there a way to programmatically change the position of a module

      I’m writing a module to help with scene changes and the main issue I’m having is that I can’t find a way to change the positions of modules after the mirror is loaded. Looking through the page, I was thinking that it would be possible to get a reference to the html element and shift its position manually, but I wanted to see if there was a proper way to do it before trying out that method.

      posted in Development
      V
      Veldrovive
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 6 / 6