-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Info box appearing offscreen after editing info_template #19
Comments
In this case, you have to adjust the info box style to support the additional height. Although info box is having hardcoded style, it can be customized which is mentioned in the doc. Since it is hardcoded, the default style config parameter doesn't include Meanwhile, here is the default style of wallpanel_screensaver:
...
...
style:
...
...
wallpanel-screensaver-info-box:
margin: '5vh auto auto 5vh'
padding: '0 0 0 0'
width: '50%'
height: '50%'
fontSize: '8vh'
fontWeight: 600
color: '#ffffff'
text-shadow: '-2px -2px 0 #000000, 2px -2px 0 #000000, -2px 2px 0 #000000, 2px 2px 0 #000000' |
@Shreyas-R I did check docs but couldn't see it. 😉 That |
I tried changing the height, both as
Using browser inspector confirms updated height is being used. Any other suggestions? Thanks, Charlie |
Similarly, if you have a vertically-oriented dashboard, the text often goes off the right-hand side of the display. |
I believe the culprit is https://github.com/Shreyas-R/lovelace-wallpanel-screensaver/blob/main/dist/wallpanel-screensaver.js#L1088 not taking in to account the size of the info box, and assuming that the width & height are both 50% |
Seems a reasonable conclusion to me; would explain why setting height of info-box didn't fix it for me. I'll do some testing. |
I know a PR would be better, but I don't have time to create one today. This change for the height seems to be working (so far). The same change probably needs to happen for width (for vertical dashboards). const allowedMaxHeight = window.innerHeight -
(infoBox.style.height.includes('%') ?
parseInt(infoBox.style.height) * window.innerHeight :
parseInt(infoBox.style.height)
); I haven't tested the height set as |
hello where exactly do you put this code? ty |
is there a setting to make the info static? not moving around? |
See the comment from @Vitani for location of code - I deleted one line and added the code above at: |
That question is not really relevant to this GH issue, you may want to ask elsewhere. I would try setting width and height to 100%. |
I know but figured a work around by setting the time it moves to like 8 hours so now it's stationary. as far as the codes I did see the earlier posts under style section but this code is very different so not sure. |
That should work too.
It may be worth waiting until there is a new release with a fix if you're not comfortable with JavaScript. |
Quick update: I have changed the I had the |
I added another line to the wallpanel-screensaver-info box via
info_template
. The change makes the info box about 25% taller. The bottom of the info box will sometimes be off the bottom of the screen, when it's positioned randomly.The text was updated successfully, but these errors were encountered: