]> _ Git - fluidbook-html5.git/commitdiff
fix #1441 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 1 Jun 2017 14:42:37 +0000 (16:42 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 1 Jun 2017 14:42:37 +0000 (16:42 +0200)
js/libs/fluidbook/fluidbook.resize.js
style/fluidbook.less

index 7ad8f0d264148118eb81562bd70e8bd677976c82..c1806cbf06e9cd127549150361086e131f8ec79d 100644 (file)
@@ -140,27 +140,18 @@ FluidbookResize.prototype = {
 
         $("#next").transform({
             scale: cssInterfaceScale,
-            translateX: 40 * (1 - interfaceScale) + 'px'
         });
 
         $("#previous").transform({
             scale: cssInterfaceScale,
-            translateX: -40 * (1 - interfaceScale) + 'px'
         });
 
         // Position audio buttons relative to book size and position
-        var audioButtonPosition = Math.max(top / this.bookScale, 30); // Ensure at least 30px clearance at the bottom
+        var audioButtonPosition = Math.max(this.hh / 6, 30 * interfaceScale); // Ensure at least 30px clearance at the bottom
         $(".audio-description-button").css({
             scale: cssInterfaceScale,
             bottom: audioButtonPosition
         });
-        $(".audio-description-button.left").css({
-            translateX: -52 * (1 - interfaceScale) + 'px'
-        });
-        $(".audio-description-button.right").css({
-            translateX: 52 * (1 - interfaceScale) + 'px'
-        });
-
 
         $("#nav,#logo,footer,#searchHints").transform({
             scale: navScale
@@ -211,7 +202,7 @@ FluidbookResize.prototype = {
         $(window).trigger('fluidbookresize');
     },
     resizeNav: function (interfaceScale) {
-        var topNext = (this.hh - 100 * interfaceScale) / 2;
+        var topNext = (this.hh - (100 * interfaceScale)) / 2;
         $("#next,#previous").css({
             top: topNext
         });
index ad1837998011bcc5d2dade46a2fbdfd5670cd89e..b368a07749a1f1755f2fb4e8bf4c2e52a81f9f86 100644 (file)
@@ -444,6 +444,7 @@ body, html {
 .rtl #previous, .ltr #next {
        background-image: url("../data/images/interface-next.svg");
        right: 0px;
+       transform-origin: 100% 0;
        border-top-left-radius: 7px;
        border-bottom-left-radius: 7px;
 }
@@ -451,6 +452,7 @@ body, html {
 .rtl #next, .ltr #previous {
        background-image: url("../data/images/interface-previous.svg");
        left: 0px;
+       transform-origin: 0 0;
        border-top-right-radius: 7px;
        border-bottom-right-radius: 7px;
 }
@@ -478,9 +480,11 @@ body, html {
        outline: none;
        position: absolute;
        cursor: pointer;
+       transform-origin: 0% 0;
 
        &.right {
                right: 0;
+               transform-origin: 100% 0;
        }
 
        &.playing {