]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6406 @0:40
authorsoufiane <soufiane@cubedesigners.com>
Fri, 13 Oct 2023 10:15:54 +0000 (12:15 +0200)
committersoufiane <soufiane@cubedesigners.com>
Fri, 13 Oct 2023 10:15:54 +0000 (12:15 +0200)
js/quiz.draganddrop.js
style/106-question-draganddrop.sass

index 2e3a5a4508d65d3e81d8c3f10d30720a620fd2cf..f0cd3164332535d7d02448205fae3def34ebae49 100644 (file)
@@ -209,7 +209,8 @@ QuizDragAndDrop.prototype = {
         let id = "answer-" + target.data("id");
 
         if (!this.quiz.resize.isMobile()) {
-            this.getAreaElement(zone).find(".slot:not(.active)").eq(0).addClass("active").append("<h4>" + title + "</h4><p>" + text + "</p>").attr('data-order', target.data("id"))
+            let freeSlot = this.getAreaElement(zone).find(".slot:not(.active)")
+            freeSlot.eq(0).addClass("active").append("<h4>" + title + "</h4><p>" + text + "</p>").attr('data-order', target.data("id"))
         }
         target.remove()
     },
@@ -244,7 +245,11 @@ QuizDragAndDrop.prototype = {
 
     getSlotInformations: function (zone) {
         let a = this.getAreaElement(zone);
-        let freeSlot = $(a).find('.slot:not(.active)').eq(0);
+        let freeSlot = $(a).find('.slot:not(.active)')
+        if(freeSlot.index() > 5) {
+            freeSlot = $(a).find('.slot:nth-child(6)')
+        }
+        freeSlot = freeSlot.eq(0);
         let freeSlotRect = $(freeSlot).get(0).getBoundingClientRect();
         let listRect = this.list.get(0).getBoundingClientRect();
         let scale = this.quiz.resize.scale
index edc7045bf20fedb0c0afea1fa685b3954e793194..1e783b4973f666aa519a6ccb6ae84d86b6d08f97 100644 (file)
@@ -61,6 +61,8 @@
 
             .card-holder
                 min-height: 196px
+                max-height: 303px
+                overflow: hidden
 
                 .m &
                     display: none