},
setCurrentPage: function (page) {
- if (this.skipChangePage) {
+ if (!this.isActive() || this.skipChangePage ) {
return;
}
let $this = this;
$(this).trigger('fluidbook.hashchange', [args.slice()]);
if (args[1] === 'closeview') {
- console.log('closeview');
return this.setCurrentPage(this.currentPage);
} else if (args[1] === 'page') {
var anchor = this.normalizeAnchor(args[2]);
}
// Jump to correct page containing this content
- // TODO: Investigate why this doesn't work properly - it should go to the page containing the link but it seems to get reset to 0, possibly caused by a resize function...
+ console.log('page transition !:!');
$this.pagetransitions.pageTransition(this.currentPage);
}
this.menu.openView(view, args[2], args[3], function () {
if (this.fluidbook.elasticslide.isActive()) {
return $("#epage_" + page + ' ' + child);
} else {
- return $("page_" + page + ' ' + child);
+ return $("#page_" + page + ' ' + child);
}
},
},
loadPage: function (pageNr, container, position, callback) {
- if (!$(container).length == 0) {
+ if ($(container).length === 0) {
container = false;
}
if (position !== 'left' && position !== 'right') {
$(page).addClass(position);
}
-
this.renderPDFTextsCanvas();
this.renderTextsCanvas();
$(page).show();
xhr.responseType = 'blob';
xhr.onload = function () {
var fr = new FileReader();
-
fr.onload = function () {
callback(this.result);
};
-
fr.readAsDataURL(xhr.response); // async call
};
-
xhr.send();
},
if (transitionType === undefined) {
transitionType = this.getTransitionType(pageNr);
}
-
if (this.fluidbook.firstTransition || transitionType === 'immediate') {
this.fluidbook.firstTransition = false;
this.fluidbook.zoom.resetZoom();