MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

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

    Scheduled Pinned Locked Moved Requests
    2 Posts 2 Posters 1.2k Views 2 Watching
    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 Offline
      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 Offline
        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 Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy