From: soufiane Date: Thu, 14 Sep 2023 16:25:33 +0000 (+0200) Subject: wip #6182 @0:20 question drag and drop X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=22006dd6cbd7b5f8516f1ee3903d143ae72445b7;p=fluidbook-toolbox-quiz.git wip #6182 @0:20 question drag and drop --- diff --git a/js/quiz.draganddrop.js b/js/quiz.draganddrop.js index fc984bf..ad93de2 100644 --- a/js/quiz.draganddrop.js +++ b/js/quiz.draganddrop.js @@ -64,6 +64,7 @@ QuizDragAndDrop.prototype = { bounds: "#quiz", onDragParams: [{}], onDrag: function() { + $(".zone-1,.zone-2").removeClass("notDrag") $(this.target).addClass("isDragging").removeClass("isNext") $this.offsetLeftItemDragged = $(this.target).offset().left @@ -133,6 +134,9 @@ QuizDragAndDrop.prototype = { } }, onRelease: function() { + // + $(".zone-1,.zone-2").addClass("notDrag") + // $this.leaveZone() @@ -181,7 +185,7 @@ QuizDragAndDrop.prototype = { }, leaveZone: function() { - $(".zone-1,.zone-2").removeClass("active") + $(".zone-1,.zone-2").removeClass("active").removeClass("isDragging") }, slapping: function(zone,target) { diff --git a/style/106-question-draganddrop.sass b/style/106-question-draganddrop.sass index b2c8680..6f840f3 100644 --- a/style/106-question-draganddrop.sass +++ b/style/106-question-draganddrop.sass @@ -161,7 +161,7 @@ height: auto left: 50% transform: translateX(-50%) - padding: 10px 40px + padding: 18px 40px border-radius: 8px border-width: 2px .text @@ -174,6 +174,11 @@ +opacity(.8,color,$texts-color) .slot display: none + + &.notDrag + .zone-content + border-color: transparent + &.zone-1 width: 100% height: auto diff --git a/views/screens/question_draganddrop.blade.php b/views/screens/question_draganddrop.blade.php index afd64fa..e712e91 100644 --- a/views/screens/question_draganddrop.blade.php +++ b/views/screens/question_draganddrop.blade.php @@ -1,5 +1,5 @@
-
+
@@ -36,7 +36,7 @@
-
+