From: soufiane Date: Thu, 11 Jan 2024 14:38:14 +0000 (+0100) Subject: wait #6590 @0:15 correctif dégradé progressif X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4790a5dfca59b5adc201547d52da8b92cd281b25;p=fluidbook-toolbox-quiz.git wait #6590 @0:15 correctif dégradé progressif --- diff --git a/js/quiz.draganddrop.js b/js/quiz.draganddrop.js index ddf23f5..025a6a4 100644 --- a/js/quiz.draganddrop.js +++ b/js/quiz.draganddrop.js @@ -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"