MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    how to detect main window size via code

    Development
    2
    4
    954
    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
      sdetweil last edited by

      in my module, i need to know the dimensions of the MM main window.

      in another mirror project I added an on.resize handler to the main window code, and had it broadcast a window size change to my plugin/module…

      how can I do that in MM?

      Sam

      Create a working config
      How to add modules

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @sdetweil last edited by

        anybody?

        I now have an update to someone elses module that needs to know the total screen size

        Sam

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User last edited by

          document.body.clientWidth & clientHeight

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @Guest last edited by

            @sean said in how to detect main window size via code:

            clientHeight

            thanks… duh, so easy!..

            Sam

            Create a working config
            How to add modules

            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