Fix
This commit is contained in:
parent
ad7538ffc4
commit
cba9f4ed0f
8
index.js
8
index.js
|
@ -166,6 +166,10 @@ const init = async (items = [], options = {}, index = 0) => {
|
|||
|
||||
const gallery = document.body.querySelector('.advdominion-lg');
|
||||
|
||||
gallery.querySelector('.advdominion-lg__container').style = `
|
||||
visibility: hidden;
|
||||
`;
|
||||
|
||||
await show(options?.animation?.show?.duration, options?.animation?.show?.easing);
|
||||
|
||||
const swiper = new Swiper(
|
||||
|
@ -174,6 +178,10 @@ const init = async (items = [], options = {}, index = 0) => {
|
|||
);
|
||||
|
||||
swiper.on('init', function () {
|
||||
gallery.querySelector('.advdominion-lg__container').style = `
|
||||
visibility: '';
|
||||
`;
|
||||
|
||||
if (this.slides[this.activeIndex].classList.contains('advdominion-lg__item_video')) {
|
||||
playVideo(this.slides[this.activeIndex]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue