From: soufiane Date: Mon, 25 Sep 2023 15:25:17 +0000 (+0200) Subject: wip #6182 @2:00 question match X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b7556e640865c97e91572fd6488fc7485f3dd8a9;p=fluidbook-toolbox-quiz.git wip #6182 @2:00 question match --- diff --git a/js/quiz.match.js b/js/quiz.match.js index 93b8679..1c7260e 100644 --- a/js/quiz.match.js +++ b/js/quiz.match.js @@ -35,12 +35,11 @@ QuizMatch.prototype = { this.swiperBottomEl = this.quiz.screens.getActiveScreen().find(".bottom-slider") this.sliderBottomHtml = this.swiperBottomEl.html() - console.log("screen",) - this.swiperTop = new Swiper('.swiper-container.top-slider', { modules: [Navigation, Pagination], slidesPerView: 1, effect: 'fade', + crossFade: true, spaceBetween: 20, mousewheelControl: false, keyboardControl: false, @@ -75,7 +74,11 @@ QuizMatch.prototype = { $this.setRotation(swiper) }, progress: function(swiper) { + console.log(swiper) $this.setRotation(swiper) + }, + update(swiper) { + console.log(swiper) } } }) @@ -113,7 +116,8 @@ QuizMatch.prototype = { let lastIndex = this.swiperTop.slides.length - 1 let index = this.swiperBottom.activeIndex this.quiz.screens.currentQuestionAnswers.push(index) - this.swiperBottom.removeSlide(index) + this.swiperBottomEl.find(".swiper-slide").get(index).remove() + //this.swiperBottom.removeSlide(index) this.swiperBottom.update() if(this.swiperTop.activeIndex === lastIndex) {