MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    Is there a module that conditionally shows/hides one module based on the state of another?

    Requests
    2
    2
    994
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      j.e.f.f Project Sponsor Module Developer last edited by

      I’ve made an information centre for my kitchen, and have used all of the screen space. One of my modules is only visible when it has information to display. When it does, it pushes the module below it partially off-screen.

      I’d like to configure this such that when module A is visible, module B is hidden, and when A is hidden, B is visible. Does a module currently exist to do this?

      N 1 Reply Last reply Reply Quote 0
      • N
        ninjabreadman @j.e.f.f last edited by

        @j.e.f.f Not that I’m aware. What about injecting JavaScript with a timer, such that "if Module 2 has an offsetHeight of greater than x, hide Module 1; else, show Module 1? Otherwise, I can imagine using the module notification system to advise Module 2 has content and to have Module 1 hide itself, and vice-versa.

        Problem with config or JavaScript? Copy/paste it into JSHint.
        Check out the detailed walkthroughs on install, config, modules, etc.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy