]> _ Git - fluidbook-toolbox-quiz.git/commitdiff
wait #6812
authorsoufiane <soufiane@cubedesigners.com>
Tue, 14 May 2024 16:19:11 +0000 (18:19 +0200)
committersoufiane <soufiane@cubedesigners.com>
Tue, 14 May 2024 16:19:11 +0000 (18:19 +0200)
js/quiz.draganddrop.js
js/quiz.resize.js
style/100-global.sass
style/105-outro.sass
style/106-question-draganddrop.sass

index 4273307943c30fcf6b7c967798fa773960840b35..f1ba64b1c27b1453f4115f0cb1796b82fc5f7c19 100644 (file)
@@ -27,7 +27,7 @@ QuizDragAndDrop.prototype = {
 
 
         let heightTitle = $("body").find("#titleQuestion").height()
-        $(".question-draganddrop").css("margin-top", heightTitle+"px")
+        $(".m .question-draganddrop").css("margin-top", heightTitle+"px")
     },
 
     start: function () {
@@ -43,7 +43,7 @@ QuizDragAndDrop.prototype = {
         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()
@@ -330,6 +330,8 @@ QuizDragAndDrop.prototype = {
         this.createDraggable(this)
         let tl = gsap.timeline()
         this.quiz.animations.animateDragAndDropCarrousel(tl)
+
+        this.reset();
     }
 }
 
index e0acdc3c489f6648fa07ee99195a15920b4fcf2c..6eb7cfe5a9b57d93f43e3d1044b039fa696977c4 100644 (file)
@@ -36,6 +36,8 @@ QuizResize.prototype = {
     },
 
     resize: function () {
+        const $this = this
+
         this.measureSizes();
         this.updateBackgrounds();
         this.updateViewport();
@@ -59,10 +61,12 @@ QuizResize.prototype = {
         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();
         }
     },
@@ -95,6 +99,7 @@ QuizResize.prototype = {
     },
 
     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');
@@ -116,9 +121,10 @@ QuizResize.prototype = {
             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});
         }
     },
 
index df3f23710028b8f99b563ca888fa600a42e6a08c..25b273e069ece82730213cea4b64ce3d29620066 100644 (file)
@@ -35,9 +35,9 @@ body
     .m &
         border-radius: 0
         box-shadow: 0 0 0
-        height: 100vh
+        //height: 100vh
         max-height: 100vh
-        min-height: 100vh
+        min-height: 0
         width: 100% //390px
         min-width: 320px //390px
         max-width: 390px
index 9002bc523361d17cdff501c615eb375f342fceb4..b13ecb99dc7b3f105bd3d6dfb974fb6d4185843b 100644 (file)
             height: 90%
             padding-right: 5px
             .item
-                margin-left: 0
+                padding-left: 0
                 &:after
                     display: none
 
index dc54ae96593f4459ce45735893341820b89b990a..67406b7ad1d2e4ca587c35ff19e2df32cbd2f6a3 100644 (file)
             .list
                 height: 178px
                 margin: 20px 0 0
+                transform: translate3d(0)
 
                 &-item
                     &:not(.overlay)