FlowingCode/CarouselAddon

Start position 1 & one slide show 2 dots

Closed this issue · 4 comments

paodb commented

This comes from #10 comment.

If the Carousel#withStartPosition-method is used (only tested it with a parameter = 1) with a carousel which holds only a single slide, there will be two dots displayed in the navigation instead of one dot.

paodb commented

I wasn't able to reproduce this behavior. I did a simple test based on our current master:

    Slide s1 = new Slide(createSlideContent("Slide 1", "green"));
    Carousel c = new Carousel(s1);
    c.setWidth("100%");
    c.setHeight("180px");
    c.setStartPosition(1);
    add(c);

and it shows the only slide that was added and only one dot, like shown in the picture:

image

In fact, it doesn't matter if you chose a greater number to set in setStartPosition, it just displays one dot as there's only one slide.

Hey,

I produced this issue in another setting:

member variable:
    Carousel c = new Carousel().withSlideDuration(4).withStartPosition(1);

constructor() {
    add(c);
}

addSlide(Sting title) {
    Slide s1 = new Slide(createSlideContent(title));
    c.setSlides(new Slide[]{s1};
}

The second dot occures at start and nothing is displayed:
slide1

If you use the slide-navigation the second dot disappears and the slide's content is displayed:
slide2

paodb commented

Hi @CoderGarm, sorry for the delay on this. Is this still an issue for you? In your latest example, no slides are being added to the carousel. I tried again as in #19 (comment) but not able to reproduce the double dot display. ( Tested in Carousel version 2.1.1 & Vaadin version 14.8.5).

Hey,

it's not an issue. I've switched my application from the vaadin frontend to angular completely a few month ago.