Skip to content
This repository has been archived by the owner on Oct 20, 2018. It is now read-only.

reset carousel point #74

Open
peppedeka opened this issue Dec 28, 2017 · 0 comments
Open

reset carousel point #74

peppedeka opened this issue Dec 28, 2017 · 0 comments

Comments

@peppedeka
Copy link

if you change dinamically the number of carousel items you can have the next problem.
carousel index pointer > of number of items.

https://cl.ly/oYLd

i try to fix with this ugly work around

NgxCarouselComponent.prototype.carouselPoint = function () {
    // if (this.userData.point.visible === true) {
    var Nos = this.items.length - (this.data.items - this.data.slideItems);
    if (Nos === 1) {
      this.moveTo(0)
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant