Compare commits

...

5 Commits
master ... v1

Author SHA1 Message Date
Valentin Silytuin 0be687757c v1.0.3 2024-03-26 14:14:58 +04:00
Valentin Silytuin 0f2a69fac5 Доработки по коду 2024-03-26 14:13:30 +04:00
Valentin Silytuin cba9f4ed0f Fix 2024-03-26 14:13:00 +04:00
Valentin Silytuin ad7538ffc4 v1.0.2 2023-08-28 14:34:56 +04:00
Valentin Silytuin 9adb3b4717 Правки по CSS 2023-08-28 14:34:43 +04:00
3 changed files with 12 additions and 4 deletions

View File

@ -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]);
}

View File

@ -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",

View File

@ -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 {