this._progressAnimation = 0;
this._pageRotation = 0;
this._callbackAfterNextRender = null;
+ this._gapOffset = 0;
+ this.jcontainerLeft = 0;
+
this.ready = false;
this.performancesTestRunning = true;
this.performancesFrames = 0;
var force = 0.65 * this.bendForceMultiplicator * 1.15;
var easeOut = Power0.easeOut;
var easeIn = Power0.easeIn;
+ var noease = Linear.easeNone;
this.tlright = new TimelineMax();
this.tlright.add(TweenMax.fromTo(this.bend, .5, {force: 0}, {
_pageRotation: -180,
ease: easeIn
}), 0);
+ this.tlright.add(TweenMax.fromTo(this, 1, {_gapOffset: -0.5}, {_gapOffset: 1.2, ease: noease}), 0);
this.tlright.pause();
this.tlright.progress(0);
_pageRotation: -0,
ease: easeIn
}), 0);
+ this.tlleft.add(TweenMax.fromTo(this, 1, {_gapOffset: 1.2}, {_gapOffset: -0.5, ease: easeOut}), 0);
this.tlleft.pause();
this.tlleft.progress(0);
},
this.modifier && this.modifier.apply();
}
+
+ if (visible) {
+ var offset = 0;
+ if (this.jcontainerWidth <= 1300 || this.jcontainerHeight <= 1300) {
+ var m = 1;
+ offset = this._gapOffset * m;
+ }
+ this.jcontainer.css({left: this.jcontainerLeft + offset});
+ }
this.setJContainerVisibility(visible);
if (this._callbackAfterNextRender !== null) {
}
var fw = $("#fluidbook").get(0).getBoundingClientRect();
- var left = (this.pw - fw.width) / 2;
+ this.jcontainerLeft = (this.pw - fw.width) / 2;
+ this.jcontainerWidth = fw.width;
+ this.jcontainerHeight = fw.height;
- this.jcontainer.css({left: left, width: fw.width, height: this.ph});
- this.jcontainer.find('canvas').css({left: -left, width: this.pw, height: this.ph});
+ this.jcontainer.css({left: this.jcontainerLeft, width: fw.width, height: this.ph});
+ this.jcontainer.find('canvas').css({left: -this.jcontainerLeft, width: this.pw, height: this.ph});
if (null !== THREE) {
this.renderer.setSize(this.pw, this.ph);
this.guessCameraZoom();