},
initSlideshow: function (s) {
+ var $this = this;
s.data('init', true);
var dir = 'data/links/' + $(s).data('dir') + '/';
$.each($(s).data('images'), function (k, i) {
});
setTimeout(function () {
- s.find('.slide:eq(0)').addClass('show');
- }, 1000);
+ var s0 = s.find('.slide:eq(0)');
+ s0.css('display', 'block');
+ setTimeout(function () {
+ s0.addClass('show');
+ }, 10);
+ }, 4000);
this.initInlineSlideshowsIntervals.push(setInterval(function () {
- var current = s.find('.slide.show');
+ var current = s.find('.slide.show').eq(0);
var next = $(current).nextAll('.slide:not(.show):eq(0)');
- if ($(next).length == 0) {
+ if ($(next).length === 0) {
next = s.find('.slide:eq(0)');
}
- $(next).addClass('show');
- $(current).removeClass('show');
+ $(next).css({display: 'block', zIndex: 2});
+
+ setTimeout(function () {
+ $(next).addClass('show').one($this.fluidbook.support.getTransitionEndEvent(), function () {
+ $(current).removeClass('show').css('display', 'none');
+ $(this).css({zIndex: ''});
+ });
+ }, 100);
+
}, parseFloat(this.fluidbook.datas.inlineSlideshowDuration) * 1000));
},
},
getTransitionType: function (pageNr) {
- pageNr = this.normalizeTransitionPageNr(pageNr);
+ if (pageNr !== undefined) {
+ pageNr = this.normalizeTransitionPageNr(pageNr);
- if (pageNr === this.fluidbook.normalizePage(this.fluidbook.currentPage) ||
- this.fluidbook.currentPage === -1 ||
- !this.fluidbook.support.transitions2d ||
+ if (pageNr === this.fluidbook.normalizePage(this.fluidbook.currentPage) ||
+ this.fluidbook.currentPage === -1) {
+ return "immediate";
+ }
+ }
+ if (!this.fluidbook.support.transitions2d ||
this.fluidbook.datas.mobileTransitions === 'none') {
- return "immediate";
+ return 'immediate';
}
if (this.fluidbook.displayOnePage) {
return 'portrait';
});
// Hack to fix #2552
- if (this.fluidbook.support.iOS && this.fluidbook.support.transitions3dacc) {
+ if (this.fluidbook.support.iOS && this.fluidbook.pagetransitions.getTransitionType() === 'flip3d') {
$('#fluidbook').css('transform', 'translate3d(0,0,-1px) scale(' + this.bookScale + ',' + this.bookScale + ')');
}
var top = marginTop + (ah - fhh) / 2;