Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Valentin Silytuin | 0be687757c | |
Valentin Silytuin | 0f2a69fac5 | |
Valentin Silytuin | cba9f4ed0f | |
Valentin Silytuin | ad7538ffc4 | |
Valentin Silytuin | 9adb3b4717 |
12
index.js
12
index.js
|
@ -157,8 +157,8 @@ const init = async (items = [], options = {}, index = 0) => {
|
|||
<div class="advdominion-lg__wrapper swiper-wrapper">
|
||||
${items.join('')}
|
||||
</div>
|
||||
${options.pagination ? options.pagination : ''}
|
||||
${options.navigation ? options.navigation : ''}
|
||||
${options.pagination || ''}
|
||||
${options.navigation || ''}
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@advdominion/lightbox-gallery",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.3",
|
||||
"type": "module",
|
||||
"packageManager": "yarn@3.6.0",
|
||||
"main": "index.js",
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 50px 55px;
|
||||
}
|
||||
|
||||
.advdominion-lg__item_video {
|
||||
|
@ -37,6 +36,7 @@
|
|||
|
||||
.advdominion-lg__image {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.advdominion-lg__video-wrapper {
|
||||
|
|
Loading…
Reference in New Issue