]> _ Git - fluidbook-html5.git/commitdiff
done #2194 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Aug 2018 13:25:08 +0000 (15:25 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Aug 2018 13:25:08 +0000 (15:25 +0200)
js/libs/fluidbook/fluidbook.background.js

index 9894a6708b20425046f77a16fd26f23b341460bf..bf4b58e198da16c90d81140cb724730f02561ae9 100644 (file)
@@ -6,10 +6,11 @@ function FluidbookBackground(fluidbook) {
 
 FluidbookBackground.prototype = {
     init: function () {
-        if (this.fluidbook.datas.links.background != undefined
-            && this.fluidbook.datas.repeat != Fluidbook.REPEAT
-            && this.fluidbook.datas.links.background != ''
+        if (this.fluidbook.datas.links.background !== undefined
+            && (this.fluidbook.datas.repeat !== Fluidbook.REPEAT || this.fluidbook.datas.tabsHTML5 !== '')
+            && this.fluidbook.datas.links.background !== ''
             && this.fluidbook.datas.mobileIgnoreBackgroundLinks === false) {
+
             $("#background").prepend('<div class="links">' + this.fluidbook.datas.links.background + '</div>');
             this.hasLinks = true;
         }
@@ -96,7 +97,13 @@ FluidbookBackground.prototype = {
                 scaleX = scaleY = Math.max(scaleX, scaleY);
             }
             if ($("#background .links .tabslink").length > 0) {
-                var transform = {scaleX: scaleX, scaleY: scaleY, translateX: translateX, translateY: translateY, origin: origin};
+                var transform = {
+                    scaleX: scaleX,
+                    scaleY: scaleY,
+                    translateX: translateX,
+                    translateY: translateY,
+                    origin: origin
+                };
                 $("#background .links").transform(transform).css(css);
             }
         }