When the web site uses amp-carousel's 'on' action event 'slideChange', this event is called after finish completely moving the slide, because debouncedResetScrollReferencePoint_ uses debounce method.
If another view changed by 'slideChange' action, users sometimes feel time lag.
So I'd be happy to configure debounce to throttle method.
I rewrote it on hand and it looks like it worked as I thought it would.
Or, the inside component of amp-carousel (type slides) already has smoothScroll option.
This option (smoothScroll: false) might be useful for this problem.
It might be solved by allowing 'smoothScroll' option to propagate to 'goToSlide'.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
When the web site uses amp-carousel's 'on' action event 'slideChange', this event is called after finish completely moving the slide, because
debouncedResetScrollReferencePoint_
usesdebounce
method.https://github.com/ampproject/amphtml/blob/master/extensions/amp-base-carousel/0.1/carousel.js#L186
If another view changed by 'slideChange' action, users sometimes feel time lag.
So I'd be happy to configure
debounce
tothrottle
method. I rewrote it on hand and it looks like it worked as I thought it would.Or, the inside component of amp-carousel (type slides) already has smoothScroll option. This option (smoothScroll: false) might be useful for this problem. It might be solved by allowing 'smoothScroll' option to propagate to 'goToSlide'.
references: https://github.com/ampproject/amphtml/blob/master/extensions/amp-base-carousel/0.1/carousel.js#L427 https://github.com/ampproject/amphtml/blob/master/extensions/amp-carousel/0.2/amp-carousel.js#L46-L62 https://github.com/ampproject/amphtml/blob/master/extensions/amp-carousel/0.2/amp-carousel.js#L240
maybe related: #23494