From 5dd8dd6d858a96fd13c1b2cd202b8a9ef2ab9cdf Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 17 Jan 2019 19:21:45 +0100 Subject: [PATCH] wip #2512 @3 --- js/libs/fluidbook/fluidbook.3dflip.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.3dflip.js b/js/libs/fluidbook/fluidbook.3dflip.js index 47251af9..ed4d2467 100644 --- a/js/libs/fluidbook/fluidbook.3dflip.js +++ b/js/libs/fluidbook/fluidbook.3dflip.js @@ -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; } -- 2.39.5