Skip to content

Commit

Permalink
Exclude scroll carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
cathyxz committed Jan 26, 2018
1 parent 8524ec3 commit e700c75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extensions/amp-lightbox-viewer/0.1/amp-lightbox-viewer.js
Expand Up @@ -804,8 +804,8 @@ export class AmpLightboxViewer extends AMP.BaseElement {
opacity: tr.numeric(1, 0),
}), MOTION_DURATION_RATIO, ENTER_CURVE_);


if (sourceElement !== null
&& sourceElement.tagName == 'AMP-IMG'
&& !this.aspectRatioChanged_(sourceElement)
&& (sourceElement == this.sourceElement_
|| this.manager_.hasCarousel(this.currentLightboxGroupId_))) {
Expand Down
Expand Up @@ -184,7 +184,11 @@ export class LightboxManager {
processLightboxCarousel_(carousel) {
const lightboxGroupId = carousel.getAttribute('lightbox') ||
'carousel' + (carousel.getAttribute('id') || this.counter_++);
this.lightboxSourceCarousels_[lightboxGroupId] = carousel;
if (carousel.getAttribute('type') == 'slides') {
this.lightboxSourceCarousels_[lightboxGroupId] = carousel;
// TODO (#13011): scroll carousel needs to support goToSlide
// before we can use it for lightbox, so they currently don't count.
}
this.getSlidesFromCarousel_(carousel).then(slides => {
slides.forEach(slide => {
if (!slide.hasAttribute('lightbox-exclude')) {
Expand Down

0 comments on commit e700c75

Please sign in to comment.