let heightTitle = $("body").find("#titleQuestion").height()
- $(".question-draganddrop").css("margin-top", heightTitle+"px")
+ $(".m .question-draganddrop").css("margin-top", heightTitle+"px")
},
start: function () {
this.htmlZone2 = this.zone2.html()
this.offsetLeftItemDragged = 0
this.offsetRightItemDragged = 0
- this.initQuestion();
+ this.reset();
this.value_ = 0
let height_ = 400 - $(".card-holder").parent().find(".text").height()
this.createDraggable(this)
let tl = gsap.timeline()
this.quiz.animations.animateDragAndDropCarrousel(tl)
+
+ this.reset();
}
}
},
resize: function () {
+ const $this = this
+
this.measureSizes();
this.updateBackgrounds();
this.updateViewport();
if (this.isMobile()) {
$(".btn.reset .text").html(iconReset);
$(".btn.moreinfo .text").html(iconInfo);
+ $("#score").css("height",$this.hh - 110 + 'px')
this.centerItems();
} else {
$(".btn.reset .text").html(textReset);
$(".btn.moreinfo .text").html(textInfo);
+ $("#score").css("height","calc(100vh - 125px)")
this.resetCenterItems();
}
},
},
updateViewport: function () {
+ const $this = this;
if (!this.isMobile()) {
$('meta[name="viewport"]').attr('content', 'width=device-width, user-scalable=no, initial-scale=1.0, shrink-to-fit=no, test=yes');
qcss.margin = '';
$("#quiz").css(qcss);
} else {
+ console.log(this.hh, $(window).innerHeight(), $(document).height())
$('html').removeClass('round');
$('meta[name="viewport"]').attr('content', 'width=' + this.mobileWidth + ', user-scalable=no, initial-scale=1.0, shrink-to-fit=no, test=yes');
- $("#quiz").css({transform: '', transformOrigin: '', top: '', left: '', margin: '0 auto'});
+ $("#quiz").css({transform: '', transformOrigin: '', top: '', left: '', margin: '0 auto', height: $this.hh});
}
},