Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Carousel animation behaviour inconsistent after setting active state #5601

Closed
DanielTibbing opened this issue Mar 8, 2016 · 6 comments
Closed

Comments

@DanielTibbing
Copy link

Bug description:

After setting active slide state to a different index it will animate to that slide not using the intended animation behaviour

Link to minimally-working plunker that reproduces the issue:

http://plnkr.co/edit/oZrLzRaLb5cAmMBnz4p0?p=preview

Clicking on one of the a-tags will reproduce the issue, it does also behave differently if you have switched to e.g slide 3 using the bootstrap arrows and then use the a-tag

Version of Angular, UIBS, and Bootstrap

Angular: 1.5.0

UIBS: 1.2.4

Bootstrap: 3.3.5

@icfantv
Copy link
Contributor

icfantv commented Mar 8, 2016

@DanielTibbing, what exactly is the behavior you are expecting?

@DanielTibbing
Copy link
Author

@icfantv I would expect it to slide in from the correct direction.

E.g. I'm on slide 1 and tell it to go to slide 3 it would slide from right to left, just the same animation as it does if I press the arrow for going to the next slide. And vice versa if I'm on slide 3 and tell it to go to slide 1 it should slide from left to right like it does by pressing the previous arrow

@icfantv
Copy link
Contributor

icfantv commented Mar 9, 2016

Ok, we'll look into this. I know there are some issues in ng-animate but off the top of my head, I don't think that's the issue here.

@DanielTibbing
Copy link
Author

I found the issue, in the $watch of 'active' you set "currentIndex = index;" before you run "self.select(slides[index]);", moving it down after it makes it work

@icfantv
Copy link
Contributor

icfantv commented Mar 10, 2016

I can't check more thoroughly at the moment, but please feel free to submit a PR (with tests).

@kbli
Copy link

kbli commented Mar 14, 2016

I can confirm this issue. The animation direction is incorrect when navigating slides via setting the active property.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants