From: Vincent Vanwaelscappel Date: Fri, 16 Feb 2024 10:44:36 +0000 (+0100) Subject: wait #6734 @0:20 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4703bbf7ef52c98774426fdae83f4baa711357fd;p=fluidbook-html5.git wait #6734 @0:20 --- diff --git a/js/libs/fluidbook/fluidbook.audioplayer.js b/js/libs/fluidbook/fluidbook.audioplayer.js index 8ea5443e..754ae7e0 100644 --- a/js/libs/fluidbook/fluidbook.audioplayer.js +++ b/js/libs/fluidbook/fluidbook.audioplayer.js @@ -80,21 +80,24 @@ FluidbookAudioPlayer.prototype = { initRedbullPlayer: function (player) { var vp = $(player).next('.visualPlayer'); + vp.append('
'); + let p = $(vp).find('.p'); if ($(player).prop('autoplay')) { $(player).addClass('playing'); $(vp).addClass('playing'); + $(p).addClass('playing'); } - vp.append('
'); - vp.append('
' + getSpriteIcon('audioplayer-play') + '
'); - vp.append('
' + getSpriteIcon('audioplayer-pause') + '
'); - vp.append('
'); + p.append('
'); + p.append('
' + getSpriteIcon('audioplayer-play') + '
'); + p.append('
' + getSpriteIcon('audioplayer-pause') + '
'); + p.append('
'); 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); }, diff --git a/js/libs/fluidbook/fluidbook.contentlock.js b/js/libs/fluidbook/fluidbook.contentlock.js index c6f7d167..ea872e96 100644 --- a/js/libs/fluidbook/fluidbook.contentlock.js +++ b/js/libs/fluidbook/fluidbook.contentlock.js @@ -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; diff --git a/style/audioplayer.less b/style/audioplayer.less index e273e1f9..2c813dd9 100644 --- a/style/audioplayer.less +++ b/style/audioplayer.less @@ -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; + } } } }