shbatm / MMM-Carousel

Displays a single magic mirror module at a time, rotating through the list of configured modules in a carousel-like fashion.
MIT License
42 stars 14 forks source link

Note: Display the same module twice on one slide #34

Open KristjanESPERANTO opened 2 years ago

KristjanESPERANTO commented 2 years ago

It took me a little time to figure this out and someone else on the forum stumbled across it too.

shbatm commented 2 years ago

Good catch for the workaround, but this is not how it's intended. It looks like I've got some flawed logic here by breaking out of the loop on a non-match: it stops looking for modules with the same name but different carouselId on the same slide config.

I'd guess you could probably also trick it by adding the modules to the slide with different carouselIds but in the reverse order they are listed in your config (bottom-up).

I will leave this PR open for now as a reminder, but I'm going to try and revisit the logic when I get a chance.

KristjanESPERANTO commented 2 years ago

And I thought it was supposed to be like this and I'm just having trouble understanding it 😅

shbatm commented 2 years ago

Nope, just bad logic. It was intended to allow the same module with different configs to be shown on different slides, but didn't take into consideration the same module, different configs, same slide.

paulsp commented 2 years ago

See the example in #36. CarouselId section-2-detail demonstrates two entries with the same id