this.item = this.activeScreen.find(".list-item")
this.zone1 = this.activeScreen.find(".zone-1 .zone-content")
this.zone2 = this.activeScreen.find(".zone-2 .zone-content")
+ this.zonecontent = this.activeScreen.find(".zone-content")
this.htmlZone1 = this.zone1.html()
this.htmlZone2 = this.zone2.html()
this.offsetLeftItemDragged = 0
this.offsetRightItemDragged = 0
this.initQuestion();
+
+ let height_ = 400 - $(".card-holder").parent().find(".text").height()
+ document.documentElement.style.setProperty('--height-zone', height_+'px');
},
+
sendCurrentAnswerToArea: function (area, index) {
if (this.animating === true) {
return;
this_score = 0;
for (let answerIndex in question.answers) {
const answer = question.answers[answerIndex];
+ console.log("answer.drop_area",answer.drop_area,"userAnswers[answerIndex]",userAnswers[answerIndex])
this_score += ((answer.drop_area === userAnswers[answerIndex]) ? 1 : 0);
}
ok = this_score >= min_score ? 'ok' : 'nok';
.zone-content
position: absolute
- top: 50%
- transform: translateY(-50%)
+ bottom: 106px
width: 180px
- height: 50%
+ height: 400px
+ +flex-config(space-between,false,column,false)
&.active
.card-holder
.card-holder
- min-height: 196px
- max-height: 303px
overflow: hidden
+ height: var(--height-zone)
+
.m &
display: none
+opacity(.08, background-color, $texts-color)
+radius(16px)
padding: 8px
- display: grid
+ display: flex
+ flex-direction: column
gap: 8px
.slot