]> _ Git - fluidbook-html5.git/commitdiff
wait #6734 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 16 Feb 2024 10:44:36 +0000 (11:44 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 16 Feb 2024 10:44:36 +0000 (11:44 +0100)
js/libs/fluidbook/fluidbook.audioplayer.js
js/libs/fluidbook/fluidbook.contentlock.js
style/audioplayer.less

index 8ea5443ecccacdc3bab1c4fe5b754ae66e1009a0..754ae7e05e05dfdcc6dc7a731d82538d02ec1cb3 100644 (file)
@@ -80,21 +80,24 @@ FluidbookAudioPlayer.prototype = {
 
     initRedbullPlayer: function (player) {
         var vp = $(player).next('.visualPlayer');
+        vp.append('<div class="p"></div>');
+        let p = $(vp).find('.p');
         if ($(player).prop('autoplay')) {
             $(player).addClass('playing');
             $(vp).addClass('playing');
+            $(p).addClass('playing');
         }
 
-        vp.append('<div class="back"></div>');
-        vp.append('<div class="icon play">' + getSpriteIcon('audioplayer-play') + '</div>');
-        vp.append('<div class="icon pause">' + getSpriteIcon('audioplayer-pause') + '</div>');
-        vp.append('<div class="arc"></div>');
+        p.append('<div class="back"></div>');
+        p.append('<div class="icon play">' + getSpriteIcon('audioplayer-play') + '</div>');
+        p.append('<div class="icon pause">' + getSpriteIcon('audioplayer-pause') + '</div>');
+        p.append('<div class="arc"></div>');
 
         var vpw = 60;
         $(player).data('halfw', vpw / 2);
-        $(vp).css('transform', 'scale(' + ($(player).outerWidth() / vpw) + ')');
+        $(p).css('transform', 'scale(' + (Math.min($(player).outerWidth(), $(player).outerHeight()) / vpw) + ')');
 
-        var paper = Raphael(vp.find('.arc').get(0), vpw, vpw);
+        var paper = Raphael(p.find('.arc').get(0), vpw, vpw);
         $(player).data(paper);
     },
 
index c6f7d167423bc6fd2b69dc87ccb28a21470b9e03..ea872e96662a1e17023db90713fe1223449f1c0c 100644 (file)
@@ -137,6 +137,10 @@ FluidbookContentLock.prototype = {
         return this.linksActions[linkId].indexOf(action) >= 0;
     },
 
+    unlockAll() {
+        this.setMaxPage();
+    },
+
     unlockCurrentPage: function () {
         var $this = this;
         var change = false;
@@ -159,7 +163,7 @@ FluidbookContentLock.prototype = {
             if (currentPage < lockPage) {
                 return;
             }
-            console.log('unlock '+lockPage+'('+currentPage+')');
+            console.log('unlock ' + lockPage + '(' + currentPage + ')');
             $this.locks[k].unlocked = 1;
             change = true;
 
index e273e1f970b0708c944dd17d8dbf1d53ac5f30c2..2c813dd98ab137c9b06906849d6a6167aa7e4977 100644 (file)
@@ -52,38 +52,53 @@ audio {
 
   &.redbull {
     + .visualPlayer {
+      top: 0;
+      left: 0;
+      width: 100%;
+      height: 100%;
+
+      .p {
 
-      .icon {
         position: absolute;
         top: 0;
         left: 0;
-        width: 100%;
-        height: 100%;
-        color: @audioplayer-icon-color;
-      }
-
-      .back {
-        position: absolute;
-        top: 7px;
-        left: 7px;
-        width: 46px;
-        height: 46px;
-        background-color: @audioplayer-background-color;
-        border-radius: 50% 50%;
-      }
-
-      .arc {
-        position: absolute;
-        top: 0 !important;
-        left: 0 !important;
         width: 60px;
         height: 60px;
+        cursor: pointer;
+        transform-origin: 0 0 0;
 
-        svg {
-          width: 60px;
-          height: 60px;
+        .icon {
+          position: absolute;
+          top: 0;
+          left: 0;
+          width: 100%;
+          height: 100%;
+          color: @audioplayer-icon-color;
+        }
+
+        .back {
+          position: absolute;
+          top: 7px;
+          left: 7px;
+          width: 46px;
+          height: 46px;
+          background-color: @audioplayer-background-color;
+          border-radius: 50% 50%;
+        }
+
+        .arc {
+          position: absolute;
           top: 0 !important;
           left: 0 !important;
+          width: 60px;
+          height: 60px;
+
+          svg {
+            width: 60px;
+            height: 60px;
+            top: 0 !important;
+            left: 0 !important;
+          }
         }
       }
     }