diff --git a/themes/intotheeast/templates/dailies.html.twig b/themes/intotheeast/templates/dailies.html.twig index e151acd..22eed21 100644 --- a/themes/intotheeast/templates/dailies.html.twig +++ b/themes/intotheeast/templates/dailies.html.twig @@ -124,7 +124,7 @@ lightbox.on('afterOpen', function () { if (!keyDir) return; var dir = keyDir; keyDir = 0; - var el = pswp.currSlide && pswp.currSlide.el; + var el = pswp.currSlide && pswp.currSlide.container; if (!el) return; el.classList.remove('pswp-key-from-left', 'pswp-key-from-right'); el.offsetWidth; diff --git a/themes/intotheeast/templates/home.html.twig b/themes/intotheeast/templates/home.html.twig index a72380a..cf4204d 100644 --- a/themes/intotheeast/templates/home.html.twig +++ b/themes/intotheeast/templates/home.html.twig @@ -159,7 +159,7 @@ lightbox.on('afterOpen', function () { if (!keyDir) return; var dir = keyDir; keyDir = 0; - var el = pswp.currSlide && pswp.currSlide.el; + var el = pswp.currSlide && pswp.currSlide.container; if (!el) return; el.classList.remove('pswp-key-from-left', 'pswp-key-from-right'); el.offsetWidth; diff --git a/themes/intotheeast/templates/trip.html.twig b/themes/intotheeast/templates/trip.html.twig index 51bcab9..83dc042 100644 --- a/themes/intotheeast/templates/trip.html.twig +++ b/themes/intotheeast/templates/trip.html.twig @@ -528,10 +528,10 @@ lightbox.on('afterOpen', function () { if (!keyDir) return; var dir = keyDir; keyDir = 0; - var el = pswp.currSlide && pswp.currSlide.el; + var el = pswp.currSlide && pswp.currSlide.container; if (!el) return; el.classList.remove('pswp-key-from-left', 'pswp-key-from-right'); - el.offsetWidth; // restart animation if navigating rapidly + el.offsetWidth; el.classList.add(dir > 0 ? 'pswp-key-from-right' : 'pswp-key-from-left'); clearTimeout(clearTimer); clearTimer = setTimeout(function () { el.classList.remove('pswp-key-from-left', 'pswp-key-from-right'); }, 400);