MichMich / MMM-Snow

54 stars 16 forks source link

Snowflakes on 1/2 screen #8

Open UweKretsen opened 3 years ago

UweKretsen commented 3 years ago

Hi, can you advise where the problem is: snów flakes drop down only to 1/2 of screen. System runs on PC win8.1 + LCD in vertical position. 26090930-745F-402B-B786-63CFC8EF5171 Thank you in advance for help. BR

Da3o55 commented 2 years ago

Hi @UweKretsen , Got the same problem ! As you, i use verticaly screen on my magicmirror2, it's on a raspberry pi but got the same effect. From my side, i use a little peace of css code to rotate. Programatically, the module still calculate the screen size as it was in landscape mode, result in snow flake falling only by screen vertical résolution. If your résolution is 1920x1080, snow flake fall only by 1080. This fix works for me, it works un landscape or portrait. I hope you will have lot's of snow this year on your magicmirror2 ;)

@media screen and (orientation:portrait) { @keyframes flake-downwards { from {transform: translateY(0vh)} to {transform: translateY(calc(100vh + 60px))} } } @media screen and (orientation:landscape) { @keyframes flake-downwards { from {transform: translateY(0vh)} to {transform: translateY(calc(100vw + 120px))} } }