Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add back loop feature. #555

Merged
merged 4 commits into from
Oct 13, 2015
Merged

add back loop feature. #555

merged 4 commits into from
Oct 13, 2015

Conversation

erwinmombay
Copy link
Member

need to create a new one cause of private -> public switch.

need to finish documentation

TODOS:

  • loop on swipe
  • loop on button click

@erwinmombay erwinmombay self-assigned this Oct 9, 2015
@erwinmombay erwinmombay changed the title [WIP] add back loop feature. add back loop feature. Oct 12, 2015
@erwinmombay erwinmombay assigned dvoytenko and unassigned erwinmombay Oct 12, 2015
@erwinmombay
Copy link
Member Author

@dvoytenko can you check if carousel integration tests still fails for you locally?

@erwinmombay
Copy link
Member Author

@dvoytenko this is ready for review.

if (nextItemIndex < 0) {
return length + (nextItemIndex % length);
}
return nextItemIndex % length;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(index + step + length) % length is a bit shorter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@dvoytenko
Copy link
Contributor

LGTM with a couple of comments.

erwinmombay added a commit that referenced this pull request Oct 13, 2015
@erwinmombay erwinmombay merged commit ae968b1 into ampproject:master Oct 13, 2015
@jpettitt jpettitt mentioned this pull request Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants