]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6590 @0:15 correctif dégradé progressif
authorsoufiane <soufiane@cubedesigners.com>
Thu, 11 Jan 2024 14:38:14 +0000 (15:38 +0100)
committersoufiane <soufiane@cubedesigners.com>
Thu, 11 Jan 2024 14:38:14 +0000 (15:38 +0100)
js/quiz.draganddrop.js

index ddf23f5398a03e3ddfb64d0ab8337ba76072246e..025a6a4ba66540eeedf88fcdf1db7b2589ef0966 100644 (file)
@@ -263,12 +263,12 @@ QuizDragAndDrop.prototype = {
         let zone = '';
 
         if (direction.includes("left") || direction.includes("up")) {
-            var rect = document.querySelector(".zone-1 .zone-content").getBoundingClientRect()
+            var rect = $this.zone1.get(0).getBoundingClientRect()
             value = direction === "up" ? 100 - ( (rectSelection.top - rect.bottom) / (listRect.top - rect.bottom) ) * 100 :
                 100 - ( (rectSelection.left - rect.right) / (listRect.left - rect.right) ) * 100
             zone = "--opacity-zone-1"
         } else {
-            var rect = document.querySelector(".zone-2 .zone-content").getBoundingClientRect()
+            var rect = $this.zone2.get(0).getBoundingClientRect()
             value = direction === "down" ? 100 - ( (rectSelection.bottom - rect.top) / (listRect.bottom - rect.top) ) * 100 :
                 100 - ( (rectSelection.right - rect.left) / (listRect.right - rect.left) ) * 100
             zone = "--opacity-zone-2"