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.

    how to set module div for fullscreen

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    6 Posts 2 Posters 3.5k 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 Do not disturb
      sdetweil
      last edited by sdetweil

      I am trying to fix MMM-ImagePhotos and MMM-Slideshow to not truncate portrait images or zoom in some landscape images…

      i have them almost completely fixed, except a small section of the screen at the bottom starting in the middle of the rss feed output and below…
      https://www.dropbox.com/s/jnudtn8wpef4ba5/IMG_20180925_125325.jpg?dl=0

      https://www.dropbox.com/s/gt1nxxwxkymgyic/IMG_20180925_125340.jpg?dl=0
      the updated code does

                      // create the div for this module
      		var wrapper = document.createElement("div");
                             // set its size to the full display area
      			wrapper.style.width  = document.body.clientWidth;
      			wrapper.style.height = document.body.clientHeight;
                              // set the div position
      			wrapper.style.left = 0;
      		        wrapper.style.top = document.body.clientHeight;
                              // make position relative
      			wrapper.style.position = "relative";
                             // set a background color to improve the looks
      			wrapper.style.backgroundColor = self.config.backgroundColor;
      			// turn off any border
      			wrapper.style.border = "none";
                              // use users opacity setting
      			wrapper.style.opacity = self.config.opacity;
      

      if I use position=“absolute” for the div it looks like this

      https://www.dropbox.com/s/k0i4hror1rx9tp5/IMG_20180925_125427.jpg?dl=0

      how can I get rid of the bottom bar?

      it looks worse on a different tv (both devices are TVs, not monitors)
      https://www.dropbox.com/s/shly9zuo8hhb3bn/IMG_20180925_125243.jpg?dl=0

      why don’t my pics show when I use the Picture info wrapper?

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 1
      • S Do not disturb
        sdetweil
        last edited by

        so close…

        client Height/Width is the screen, but the body has height/width reduced by margins…

        how can I get the size of the margin in javascript to do the corrections programatically?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        strawberry 3.141S 1 Reply Last reply Reply Quote 0
        • strawberry 3.141S Offline
          strawberry 3.141 Project Sponsor Module Developer @sdetweil
          last edited by

          @sdetweil there are units called view width and view height, try those

          100vw and 100vh

          Please create a github issue if you need help, so I can keep track

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @strawberry 3.141
            last edited by

            @strawberry-3-141 thanks… sadly this re-introduces the margins in both dimensions

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil
              last edited by

              here is another way.

              window.getComputedStyle(document.body).getPropertyValue('margin-top');
              

              now… i forgot that I had a custom.css to eliminate the margins.

              but the fullscreen style still has the -60 adjustments for the default border

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil
                last edited by

                Using the fullscreens.above class for the div makes this a lot easier. No modification of the std css is required

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 1

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 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