ngu-carousel
ngu-carousel copied to clipboard
Portrait vs landscape view
If you have an iPad/tablet and for example you have 3 images in carousel. In portrait view you just show one and you have to slide to see the next images. If you slide to the last one and change to landscape view, the slider is now "broken". The issue is the transform css feature, should be translate3d(-0%, 0, 0) and it's not. There's any way to fix this quicly?
Thanks.
@Agrati Hi,
I using chrome responsive inspection only. I'll try in my mobile and fix it.
Hey @sheikalthaf,
Have the same problem here you can test this in chrome, if you have multiple sides per page and go to your last slide when maxim resize your window the slide will be broken.
Thanks.
As a workaround, I'm doing a this.myCarousel.moveTo(0)
when there is a change across a responsive breakpoint.
--- this is still an issue. I have tested in angular 8 with ngu carousel 1.5.5 and angular 9 with latest. Basically if you scroll to last tile while in a viewport grid size such as xs or sm, then resize browser (or turn tablet to portrait) so viewport becomes md or lg grid width, then the carousel does not update the number of tiles in the page correctly, and there is no active pointNumber set.
From @matthewdfleming comment above --
As a workaround, I'm doing a
this.myCarousel.moveTo(0)
when there is a change across a responsive breakpoint. -- could someone share an example of how to subscribe to a change across breakpoint from ts file, so I could try something similar?
I found the issue was that for a moment the pointNumbers active value (pointNumbers index) can be same as the length of pointNumbers array which is not valid and causes the active pointNumber to not be set in the carousel. I tried forcing a moveTo last page, but carousel already thinks it is on last page so nothing happens.