week-planner-card
week-planner-card copied to clipboard
Scroll Events when overflowing
I use this plugin to emulate a magic mirror calendar and the only feature missing is that overflow should automatically scroll to bottom, then back to top infinitely. The reason this is useful is if you have this pinned to bottom of screen with max height set using cardmod, days with lots of events just cut off.
I attempted to start fixing this but was unsure how the whole shadow DOM situation worked so I gave up. I had it working in my console and scrolling was working but I didn't know how to do a callback on a timeout to attempt to run it every x seconds to scroll
https://github.com/dhruvb14/week-planner-card/blob/main/src/card.js#L204
Inspiration from MM - https://github.com/MMRIZE/MMM-CalendarExt3 (They use marquee setting for left to right and by default it scrolls vertically)
My Current Cardmod
card_mod:
style: |
ha-card {
border-style: solid;
border-radius: 15px;
position: absolute;
bottom: 0;
width: 100%;
}
.events {
max-height: 50px;
overflow-y: scroll;
overflow-x: hidden; /* Hide horizontal scrollbar */
scroll-behavior: smooth;
}
.events::-webkit-scrollbar {
display: none;
}