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

Amp slidescroll experiment - Handling Native Snapping #3798

Merged
merged 9 commits into from Jun 28, 2016

Conversation

camelburrito
Copy link
Contributor

In this PR

  • Scroll Support for snap-points

Yet to come

  • Polyfill snapping

Part 4 for - #3465

this.noOfSlides_ = this.slides_.length;

/** @private @const {boolean} */
this.hasLooping_ =
Copy link
Member

Choose a reason for hiding this comment

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

This is already assigned to above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@cramforce
Copy link
Member

Can I try this on Heroku?

@camelburrito
Copy link
Contributor Author

camelburrito commented Jun 28, 2016

@cramforce - heroku url - https://ampskrish.herokuapp.com/test/manual/amp-slidescroll.amp.html
You need to enable the amp-slidescroll experiment

BTW - this only works on Iphone/safari (were snap points work).

const currentScrollLeft = this.slidesContainer_./*OK*/scrollLeft;
if (currentScrollLeft != this.previousScrollLeft_ &&
!this.hasNativeSnapPoints_) {
// TODO(sriramkrish85)Handle custom scroll here.
Copy link
Member

Choose a reason for hiding this comment

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

Nit: space after ) :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@cramforce
Copy link
Member

LGTM

@camelburrito camelburrito force-pushed the snapscroll branch 2 times, most recently from d238724 to 4287743 Compare June 28, 2016 00:52
@camelburrito camelburrito merged commit fd41cfd into ampproject:master Jun 28, 2016
@camelburrito camelburrito deleted the snapscroll branch June 28, 2016 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Slidescroll experiment
Completed Pull Requests
Development

Successfully merging this pull request may close these issues.

None yet

3 participants