• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Change layout based on orientation?

Scheduled Pinned Locked Moved Development
13 Posts 2 Posters 980 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.
  • S Offline
    sdetweil @gonzonia
    last edited by Mar 1, 2025, 8:11 PM

    @gonzonia there is a moduke that can
    move dynamically
    https://github.com/Toreke/MMM-Dynamic-Modules

    but it needs notifications

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    S 1 Reply Last reply Mar 1, 2025, 8:14 PM Reply Quote 0
    • S Offline
      sdetweil @sdetweil
      last edited by sdetweil Mar 1, 2025, 8:14 PM Mar 1, 2025, 8:14 PM

      @gonzonia or start a different instance on a different port for landscape

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      G 1 Reply Last reply Mar 1, 2025, 8:17 PM Reply Quote 0
      • G Offline
        gonzonia @sdetweil
        last edited by Mar 1, 2025, 8:17 PM

        @sdetweil That’s a thought. I think I can probably adapt the Dynamic Modules to allow for a config option to adjust based on orientation and that gets triggered at the ALL_MODULES_STARTED notification from the core.

        Let me fork that and see if I can make that work.

        S 1 Reply Last reply Mar 1, 2025, 8:49 PM Reply Quote 0
        • S Offline
          sdetweil @gonzonia
          last edited by sdetweil Mar 1, 2025, 8:49 PM Mar 1, 2025, 8:49 PM

          @gonzonia create your own module

          send the notifications when it matters

          lot easier

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          G 1 Reply Last reply Mar 1, 2025, 9:05 PM Reply Quote 0
          • G Offline
            gonzonia @sdetweil
            last edited by Mar 1, 2025, 9:05 PM

            @sdetweil Maybe. I find it easier to build on someone else’s code. After I have some basic stuff functioning, I’ll look for a module template to work from. I’m also not sure the dynamic module will work (it’s 7 years old) so it might need to be updated anyhow.

            S 1 Reply Last reply Mar 1, 2025, 9:06 PM Reply Quote 0
            • S Offline
              sdetweil @gonzonia
              last edited by sdetweil Mar 1, 2025, 9:18 PM Mar 1, 2025, 9:06 PM

              @gonzonia all you need is a
              notificationReceived
              “DOM_OBJECTS_CREATED”
              if the width is greater than the height its landscape
              then loop thru the config

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              G 1 Reply Last reply Mar 1, 2025, 9:31 PM Reply Quote 0
              • G Offline
                gonzonia @sdetweil
                last edited by Mar 1, 2025, 9:31 PM

                @sdetweil I’m going to make it more dynamic. There’s actually screen.orientation.type that works to get landscape vs portrait

                S 1 Reply Last reply Mar 1, 2025, 9:37 PM Reply Quote 0
                • S Offline
                  sdetweil @gonzonia
                  last edited by Mar 1, 2025, 9:37 PM

                  @gonzonia sameo

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • 1
                  • 2
                  • 1 / 2
                  1 / 2
                  • First post
                    10/13
                    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