]> _ Git - fluidbook-html5.git/commitdiff
wip #2512 @3
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 17 Jan 2019 18:21:45 +0000 (19:21 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 17 Jan 2019 18:21:45 +0000 (19:21 +0100)
js/libs/fluidbook/fluidbook.3dflip.js

index 47251af908efe2444fa6f371ebd24b127bf93111..ed4d2467cfc62546d7e02428adee27e5ed5cd27f 100644 (file)
@@ -679,9 +679,10 @@ Fluidbook3DFlip.prototype = {
         }
 
         var fw = $("#fluidbook").get(0).getBoundingClientRect();
+        var left = (this.pw - fw.width) / 2;
 
-        this.jcontainer.css({left: fw.left, width: fw.width, height: this.ph});
-        this.jcontainer.find('canvas').css({left: -fw.left, width: this.pw, height: this.ph});
+        this.jcontainer.css({left: left, width: fw.width, height: this.ph});
+        this.jcontainer.find('canvas').css({left: -left, width: this.pw, height: this.ph});
         if (null !== THREE) {
             this.renderer.setSize(this.pw, this.ph);
             this.guessCameraZoom();
@@ -692,7 +693,7 @@ Fluidbook3DFlip.prototype = {
         if (null === THREE) {
             return;
         }
-        if (this._progressAnimation != 0 && this._progressAnimation != 1) {
+        if (this._progressAnimation !== 0 && this._progressAnimation !== 1) {
             return;
         }