]> _ Git - fluidbook-html5.git/commitdiff
wait #3333 @4
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 14 Jan 2020 16:42:15 +0000 (17:42 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 14 Jan 2020 16:42:15 +0000 (17:42 +0100)
js/libs/fluidbook/fluidbook.loader.js
style/fluidbook.less

index 6ced7c76b03c22efa8a0fd0a801d6cb407d5f57d..207eb07c9940bd8d90fd50c691c95c500f9ffe40 100644 (file)
@@ -25,8 +25,8 @@ FluidbookLoader.prototype = {
 
     getPageDimensions: function (page, width) {
         var dim = this.fluidbook.datas.pagesDimensions[page];
-        if(dim===undefined){
-            console.log(page);
+        if (dim === undefined) {
+
         }
         var height;
         if (undefined === width) {
@@ -258,7 +258,9 @@ FluidbookLoader.prototype = {
 
         } else {
             this.loadLeftPage(leftPage, $(doublePage), function () {
-                $this.loadRightPage(rightPage, $(doublePage), callback);
+                $this.loadRightPage(rightPage, $(doublePage), function () {
+                    callback();
+                });
             });
         }
     },
@@ -280,11 +282,11 @@ FluidbookLoader.prototype = {
         // Si la page existe déjà, on la place à la bonne position et on l'affiche
         if ($("#page_" + pageNr).length > 0) {
             page = $("#page_" + pageNr);
-            if ($(doublePage).find("#page_" + pageNr).length == 0) {
+            if ($(doublePage).find("#page_" + pageNr).length === 0) {
                 $(doublePage).append(page);
             }
             if (!$(page).hasClass(position)) {
-                if (position == 'left') {
+                if (position === 'left') {
                     $(page).removeClass('right');
                 } else {
                     $(page).removeClass('left');
@@ -308,16 +310,19 @@ FluidbookLoader.prototype = {
         $(page).show();
         $(page).addClass(position);
         var back = $(page).children(".background")[0];
-        this.loadDatas(pageNr, callback);
-        $(page).addClass(position);
+        var $this = this;
+        this.loadDatas(pageNr, function () {
+            $(page).addClass(position);
 
-        shade = 'shade' + position;
-        if (this.fluidbook.datas.pageReflection) {
-            shade += '-reflet';
-        }
-        shade += '.png';
-        $(page).children('.clinks').html(this.fluidbook.datas.clinks[pageNr]);
-        $(page).children(".shade").html(this.loadPageShade(position));
+            shade = 'shade' + position;
+            if ($this.fluidbook.datas.pageReflection) {
+                shade += '-reflet';
+            }
+            shade += '.png';
+            $(page).children('.clinks').html($this.fluidbook.datas.clinks[pageNr]);
+            $(page).children(".shade").html($this.loadPageShade(position));
+            callback();
+        });
     },
     loadPageShade: function (position) {
         return this.loadImage('images/shadows/pages/' + position + '.png', this.fluidbook.datas.width / 4, this.fluidbook.datas.height);
@@ -356,6 +361,7 @@ FluidbookLoader.prototype = {
         this._loadBackground(page, function () {
             $(back).addClass('r' + $this.fluidbook.support.resolution);
             $(back).append($this.backgrounds[page]);
+            callback();
         });
     },
     setOnStage: function (element) {
@@ -541,7 +547,9 @@ FluidbookLoader.prototype = {
     loadDatas: function (pageNr, callback) {
         var $this = this;
         this.loadTexts(pageNr, function () {
-            $this.setBackground(pageNr, callback);
+            $this.setBackground(pageNr, function () {
+                callback();
+            });
         });
     },
     getImage: function (src, width, height, type, callback) {
index a796b2d746929718926da4c7242922cc565cfa61..cc0b984298ddddfbc874825e63abfb110319e267 100644 (file)
@@ -2229,11 +2229,13 @@ ul.chapters.shareList a.level0 .svg-icon {
   -o-perspective-origin: 50% 75%;
   perspective-origin: 50% 75%;
 
-  -moz-perspective: 5000px;
-  -webkit-perspective: 5000px;
-  -o-perspective: 5000px;
-  -ms-perspective: 5000px;
-  perspective: 5000px;
+  @perspective: 5000px;
+
+  -moz-perspective: @perspective;
+  -webkit-perspective: @perspective;
+  -o-perspective: @perspective;
+  -ms-perspective: @perspective;
+  perspective: @perspective;
 
   overflow: visible !important;
 }
@@ -2271,6 +2273,10 @@ ul.chapters.shareList a.level0 .svg-icon {
   backface-visibility: hidden;
 
   left: 0px !important;
+
+  .chrome & {
+    backface-visibility: visible;
+  }
 }
 
 .doublePage._3d .right {