• 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.

how to set module div for fullscreen

Scheduled Pinned Locked Moved Unsolved Troubleshooting
6 Posts 2 Posters 3.1k 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 Away
    sdetweil
    last edited by sdetweil Sep 25, 2018, 6:08 PM Sep 25, 2018, 5:57 PM

    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 Away
      sdetweil
      last edited by Sep 26, 2018, 5:45 PM

      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

      S 1 Reply Last reply Sep 26, 2018, 7:36 PM Reply Quote 0
      • S Offline
        strawberry 3.141 Project Sponsor Module Developer @sdetweil
        last edited by Sep 26, 2018, 7:36 PM

        @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 Sep 26, 2018, 8:16 PM Reply Quote 0
        • S Away
          sdetweil @strawberry 3.141
          last edited by Sep 26, 2018, 8:16 PM

          @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 Away
            sdetweil
            last edited by Sep 27, 2018, 1:48 PM

            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 Away
              sdetweil
              last edited by Oct 13, 2018, 5:02 PM

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