this.viewport.updateViewport();
this.desktop = new FluidbookDesktop(this);
this.share = new FluidbookShare(this);
+ this.firstTransition = true;
if (Modernizr.ftouch && this.support.transitions2d && this.datas.mobileTransitions != 'none') {
this.touch = new FluidbookTouch(this);
}
this.form = new FluidbookBulleForm(this);
} else if (this.datas.form == 'bourbon') {
this.form = new FluidbookBourbonForm(this);
- } else if(this.datas.form=='avery'){
+ } else if (this.datas.form == 'avery') {
this.form = new FluidbookAveryForm(this);
- }else{
+ } else {
this.form == false;
}
this.privacy = new FluidbookPrivacy(this);
return;
},
pageTransition: function (pageNr) {
+
$(this).trigger('fluidbook.beforePageTransition');
this.tooltip.hideTooltip();
pageNr = 1;
}
}
+ console.log('transiton to ' + pageNr);
pageNr = this.normalizePage(pageNr);
- if (pageNr == this.normalizePage(this.currentPage) || this.currentPage == -1 || !this.support.transitions2d || this.datas.mobileTransitions == 'none') {
+ if(pageNr===0){
+ throw new Error('!!!');
+ }
+ if (this.firstTransition || pageNr === this.normalizePage(this.currentPage) || this.currentPage === -1 || !this.support.transitions2d || this.datas.mobileTransitions === 'none') {
+ this.firstTransition = false;
return this.pageTransition1D(pageNr);
}
if (this.displayOnePage) {
this._openFile(pdf, button, 'pdf', pdfName, print);
},
-
_openFile: function (url, e, type, localname, print) {
if (print === undefined) {
console.warn('Orientation change! ' + this.orientation);
$(this.fluidbook).trigger('fluidbook.resize.beforeOrientationChange');
this.fluidbook.zoom.resetZoom();
- this.fluidbook.pageTransition();
+ if(!this.fluidbook.firstTransition) {
+ this.fluidbook.pageTransition();
+ }
$(this.fluidbook).trigger('fluidbook.resize.orientation', {orientation: this.orientation});
if (this.fluidbook.support.android) {
setTimeout(function () {