This commit is contained in:
Valentin Silytuin 2024-03-26 14:13:00 +04:00
parent ad7538ffc4
commit cba9f4ed0f
1 changed files with 8 additions and 0 deletions

View File

@ -166,6 +166,10 @@ const init = async (items = [], options = {}, index = 0) => {
const gallery = document.body.querySelector('.advdominion-lg'); 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); await show(options?.animation?.show?.duration, options?.animation?.show?.easing);
const swiper = new Swiper( const swiper = new Swiper(
@ -174,6 +178,10 @@ const init = async (items = [], options = {}, index = 0) => {
); );
swiper.on('init', function () { swiper.on('init', function () {
gallery.querySelector('.advdominion-lg__container').style = `
visibility: '';
`;
if (this.slides[this.activeIndex].classList.contains('advdominion-lg__item_video')) { if (this.slides[this.activeIndex].classList.contains('advdominion-lg__item_video')) {
playVideo(this.slides[this.activeIndex]); playVideo(this.slides[this.activeIndex]);
} }