]> _ Git - fluidbook-html5.git/commitdiff
wip #2332
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 2 Jan 2019 19:09:49 +0000 (20:09 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 2 Jan 2019 19:09:49 +0000 (20:09 +0100)
js/libs/fluidbook/fluidbook.3dflip.js
js/libs/fluidbook/fluidbook.search.js
js/widget.js

index c8fa6331c66896c8879dc1423bcb4587ea386ff3..a9660dae960552782b75a0047e1cc7aaafc2cbc8 100644 (file)
@@ -247,7 +247,6 @@ Fluidbook3DFlip.prototype = {
             this.scene.add(new THREE.AmbientLight(0xffffff, 1.5));
         }
 
-
         var zoom = 0.8;
         var far = 24000 * zoom;
         var near = 1000;
@@ -370,9 +369,7 @@ Fluidbook3DFlip.prototype = {
         this.renderer.setSize(this.pw, this.ph);
 
         // Empty element before
-        while (this.container.firstChild) {
-            this.container.removeChild(this.container.firstChild);
-        }
+        this.jcontainer.empty();
         this.container.appendChild(this.renderer.domElement);
 
         this.initAnimations();
index d2d2a24f141f16fb735a51818c1abfbe1097397d..a881deb95cffc293a60cfef7c1b140067a0e61ff 100644 (file)
@@ -602,7 +602,7 @@ FluidbookSearch.prototype = {
                 return;
             }
 
-            if (totalHits == 0) {
+            if (totalHits === 0) {
                 // Should pages with no results still be shown?
                 if ($this.fluidbook.datas.searchShowNoResultsPages) {
                     $(this).append('<div class="overlay"></div>');
index a330f2e63b8ab45438844bc697314b279fa095e3..1461c7a0d89d336f7b6f798b3f238148d18fa2ad 100644 (file)
@@ -160,7 +160,7 @@ $(function () {
             var leftPage = $('.p[data-page=' + page + ']');
             var rightPage = $('.p[data-page=' + (page + 1) + ']');
 
-            if (!transition || this.transition == 'none') {
+            if (!transition || this.transition === 'none') {
                 $("#nextDoublePage .p,#currentDoublePage .p").hide().appendTo(this.e);
                 $("#currentDoublePage").append($(leftPage)).append($(rightPage));
                 $(leftPage).show();
@@ -176,7 +176,7 @@ $(function () {
                 $("#nextDoublePage").remove();
                 this.animating = false;
             } else {
-                if (this.transition == '2d') {
+                if (this.transition === '2d') {
                     $("#widget").css('overflow', 'hidden');
                     this.e.append('<div id="nextDoublePage"></div>');
                     $(leftPage).show();
@@ -211,10 +211,10 @@ $(function () {
                             $this.gotoPage(page, false)
                         });
                     }
-                } else if (this.transition == '3d') {
+                } else if (this.transition === '3d') {
                     $("#widget").css('overflow', 'visible');
                     var nextFromClass;
-                    if (this.dir == 1) {
+                    if (this.dir === 1) {
                         nextFromClass = 'next';
                     } else {
                         nextFromClass = 'prev';
@@ -225,7 +225,7 @@ $(function () {
 
                     $("#currentDoublePage .p").hide().appendTo(this.e);
                     var leftTurn, rightTurn;
-                    if (this.dir == 1) {
+                    if (this.dir === 1) {
                         leftPage = $('.p[data-page=' + this.currentPage + ']');
                         rightPage = $('.p[data-page=' + (page + 1) + ']');
                         leftTurn = $('.p[data-page=' + page + ']');
@@ -243,7 +243,7 @@ $(function () {
                     $(rightTurn).show();
 
                     $("#currentDoublePage").append($(leftPage)).append($(rightPage));
-                    if (this.dir == -1) {
+                    if (this.dir === -1) {
                         $("#nextDoublePage").append($(leftTurn)).append($(rightTurn));
                     } else {
                         $("#nextDoublePage").append($(rightTurn)).append($(leftTurn));
@@ -265,7 +265,7 @@ $(function () {
         },
         goNextPage: function () {
             var p;
-            if (this.dir == 1) {
+            if (this.dir === 1) {
                 p = this.currentPage + 2;
                 if (p > this.to) {
                     p -= 4;