MMM-Carousel
MMM-Carousel copied to clipboard
Only the first carouselId is displayed on a slide for a unique module.
slides: [ [
{name:'MMM-SimpleText', carouselId: '1.3'},
{name:'MMM-SimpleText', carouselId: '1.4'},
]
]
Will only display carouselId: '1.3'. If the break
is change to continue
both 1.3 and 1.4 will be displayed.
https://github.com/shbatm/MMM-Carousel/blob/22b64b2aa686b6d3c1972aef770be64082dd5f89/MMM-Carousel.js#L363-L369
Related to #34
The following config.js snipit works as expected with the above mentioned fix.
modules: [
{
module: 'helloworld',
position: 'center_middle',
config: {
carouselId: 'section-1-header',
text: 'Section 1'
}
},
{
module: 'helloworld',
position: 'center_middle',
config: {
carouselId: 'section-1-detail',
text: 'Detail Line 1.1'
}
},
{
module: 'helloworld',
position: 'center_middle',
config: {
carouselId: 'section-1-detail',
position: 'center_middle',
config: {
carouselId: 'section-1-detail',
text: 'Detail Line 1.2'
}
},
{
module: 'helloworld',
position: 'center_middle',
config: {
carouselId: 'section-2-header',
text: 'Section 2'
}
},
{
module: 'helloworld',
position: 'center_middle',
config: {
carouselId: 'section-2-detail',
text: 'Detail Line 2.1'
}
},
{
module: 'helloworld',
position: 'center_middle',
config: {
carouselId: 'section-2-detail',
text: 'Detail Line 2.2'
}
},
{
module: 'MMM-Carousel',
position: 'bottom_bar',
config: {
mode: 'slides',
slides: [
[
{name:'helloworld', carouselId: 'section-1-header'}, // Expect 1 line
{name:'helloworld', carouselId: 'section-1-detail'}, // Expect 2 lines
{name:'helloworld', carouselId: 'section-2-header'}, // Expect 1 line
{name:'helloworld', carouselId: 'section-2-detail'}, // Expect 2 lines
{name:'helloworld', carouselId: 'section-2-detail'}, // Expect zero lines as duplicate carouselId in slide
{name:'helloworld', carouselId: 'section-2-detail'}, // Expect zero lines as duplicate carouselId in slide
{name:'helloworld', carouselId: 'section-3-header'}, // Expect zero lines as carouselId not defined
{name:'helloworld', carouselId: 'section-3-detail'}, // Expect zero lines as carouselId not defined
]
]
}
}
]
the fix on line 368 seemed to work for me