]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wip #6182 @1:30 question drag and drop
authorsoufiane <soufiane@cubedesigners.com>
Fri, 8 Sep 2023 16:32:11 +0000 (18:32 +0200)
committersoufiane <soufiane@cubedesigners.com>
Fri, 8 Sep 2023 16:32:11 +0000 (18:32 +0200)
js/quiz.draganddrop.js
views/index.blade.php

index ddcde8319309cecf5019a297c7873873db7df475..c487207df7acc7d1611278a87b96fb962b78b2f2 100644 (file)
@@ -54,7 +54,8 @@ QuizDragAndDrop.prototype = {
                 let zone = $this.getZoneOverlap($this.offsetLeftItemDragged,$this.offsetRightItemDragged),
                     slot = $this.getSlotInformations(zone);
 
-                let heightSubject = $(this.target).height()
+                let target = $(this.target),
+                    heightTarget = $(this.target).height()
 
                 //
                 gsap.timeline().to(this.target, {
@@ -66,16 +67,16 @@ QuizDragAndDrop.prototype = {
                     padding: "7px 8px",
                     borderRadius: "8px",
                     onStart: function() {
-                        $($this.target).addClass("onStart")
+                        target.addClass("onStart")
                     },
-                    onComplete: function(element) {
-                        let html = $($this.target).html()
+                    onComplete: function() {
+                        let html = target.html()
                         $(zone).find(".slot:not(.active)").eq(0).addClass("active").html(html)
-                        $($this.target).remove()
+                        target.remove()
                     }
                 })
                 .to(".list .overlay", {
-                    y: -heightSubject,
+                    y: -heightTarget,
                     opacity: 0,
                     onStart: function() {
                         $($this.target).next().addClass("isNext")
index 8ae0da465b397bfedf1938d7e20a35e436c99ce8..a25a03ddc851fc48b2cf973fdb18792e9d1247ab 100644 (file)
@@ -27,7 +27,6 @@
         <div id="instantReviewAnimation"></div>
     </div>
 </div>
-<div style="width:1px;height:100vh;position:absolute;left:620px;background:white;z-index:99;top:0;"></div>
 <script src="js/quiz.js"></script>
 <script>
     function changeViewportSize () {