bruckwubete / ngx-carousel-3d

Ngx Carousel
7 stars 9 forks source link

Options for carousel #6

Open AbhinavFreq opened 5 years ago

AbhinavFreq commented 5 years ago

The options object is not reflected into the carousel and also Please check and provide a solution how can we reload the carousel with dynamic options

abdatta commented 5 years ago

I think there is a function inside the component (check it's code) that can be called to rebuild the carousal on options update. Use ViewChild to have an instance of that component in your component class and call the function whenever you change options.

AbhinavFreq commented 5 years ago

I have checked but I couldn't find it in module and also it is not displaying 1 carousel if I have 4 slides. Could you please help me out with this. My main issue is that Carousel is displaying odd number of slides even if i have even number of slides Example - Total Slides - 4, Displaying - 3 Total Slides - 6, Displaying - 5 Total Slides - 8, Displaying - 7

abdatta commented 5 years ago

Yes it always shows odd number of slides (otherwise the carousal won't be symmetric). The hidden photos are visible as you scroll through the photos (by clicking them). Also yes there is a buildCarousel() function to rebuild the carousal with updated options. Search for it in the source code for the component: [https://github.com/bruckwubete/ngx-carousel-3d/blob/master/src/app/modules/ngx-carousel-3d/ngx-carousel-3d.component.ts]

AbhinavFreq commented 5 years ago

Thanks for the info, Can we override this option to show only odd number of slides. I need to show max 9 slides per page it may be even or odd

abdatta commented 5 years ago

You can modify the code and send a pull request. I'm not the owner of the code though, so I don't have a lot of knowledge of the entire code base. I just had worked with this library some time ago, so I remembered a few stuffs. You can make a local copy which you can import in your Angular project, until the pr doesn't get accepted.