Skip to content

Commit

Permalink
Add swiperPagination
Browse files Browse the repository at this point in the history
  • Loading branch information
mtdkei authored and mtdkei committed Feb 21, 2025
1 parent 557d52f commit 505569a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/blocks/slider/edit-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ const LaunchSwiper = (slider) => {
if (swiperButtonNext) {
swiperButtonNext.style.display = '';
}
const swiperPagination = slider.querySelector(
'.swiper-pagination'
);
if (swiperPagination) {
swiperPagination.style.display = '';
}

// Sloder の設定を作成
const SwiperSetting = {};
Expand Down Expand Up @@ -211,7 +217,7 @@ const LaunchSwiper = (slider) => {
removeSwiperClassName(newSwiperDiv);
}

// 不要な wiper-wrapper クラスを削除
// 不要な swiper-wrapper クラスを削除
const newSwiperWrapper = slider.querySelector(
'.block-editor-block-list__layout'
);
Expand Down Expand Up @@ -243,6 +249,15 @@ const LaunchSwiper = (slider) => {
if (swiperButtonNext) {
swiperButtonNext.style.display = 'none';
}

// ページネーションの非表示
const swiperPagination = slider.querySelector(
'.swiper-pagination'
);
if (swiperPagination) {
swiperPagination.style.display = 'none';
}

if (swiper[sliderId]) {
swiper[sliderId].destroy();
swiper[sliderId] = null;
Expand Down

0 comments on commit 505569a

Please sign in to comment.