this.shadeRight = this.loadImage('images/shadows/pages/right.png');
},
- getPageDimensions: function (page) {
+ getPageDimensions: function (page, width) {
var dim = this.fluidbook.datas.pagesDimensions[page];
- return {width: dim[0], height: dim[1]};
+ var height;
+ if (undefined === width) {
+ width = dim[0];
+ height = dim[1];
+ } else {
+ height = dim[1] * (width / dim[0]);
+ }
+ return {width: width, height: height};
},
getVersionToLoad: function (page) {
resizeIndex: function () {
$("#indexViewHolder").css('width', this.fluidbook.datas.pages * 130);
setTimeout(function () {
- $("#indexView").perfectScrollbar('update');
+ $("#indexViewHolder").perfectScrollbar('update');
+ $("#indexViewHolder").find('.ps__rail-x').addClass('ps--clicking');
}, 500)
- $("#indexView").perfectScrollbar();
+ $("#indexViewHolder").perfectScrollbar({
+ suppressScrollY: true,
+ useBothWheelAxes: true
+ });
+ $("#indexViewHolder").find('.ps__rail-x').addClass('ps--clicking');
},
}
\ No newline at end of file
}
if (i > 0) {
- ix1 += '<div class="thumb ' + s1 + '"><a href="#/page/' + i + '">' + this.fluidbook.loader.getThumbImage(i, true) + '</a><span class="number">' + this.fluidbook.physicalToVirtual(i) + '</span>';
+ var h = '';
+ var pnt = '';
+ if (this.fluidbook.mobilefirst.enabled) {
+ var ph = this.fluidbook.loader.getPageDimensions(i, 100).height;
+ h = ' style="height:' + ph + 'px;"'
+ pnt = ' style="top:' + (ph - 5) + 'px;"';
+ }
+ ix1 += '<div class="thumb ' + s1 + '"' + h + '><a href="#/page/' + i + '">' + this.fluidbook.loader.getThumbImage(i, true) + '</a><span class="number"' + pnt + '>' + this.fluidbook.physicalToVirtual(i) + '</span>';
if (this.fluidbook.bookmarks.enabled) {
ix1 += this.fluidbook.bookmarks.getBookmarkForPage(i, true);
}
s2 = 'left'
}
if (!this.singleMode) {
-
if (j <= this.fluidbook.contentlock.getMaxPage()) {
ix2 += '<div class="thumb ' + s1 + '"><a href="#/page/' + j + '">' + this.fluidbook.loader.getThumbImage(j, true) + '</a><span class="number">' + this.fluidbook.physicalToVirtual(j) + '</span>';
if (this.fluidbook.bookmarks.enabled) {
} else {
ix = ix1;
}
- this.normalHTML += '<div class="doubleThumb' + c + '" page="' + i + '" data-pages="' + pages.join(',') + '">' + ix;
+
+ var dth = '';
+ if (this.fluidbook.mobilefirst.enabled) {
+ dth = ' style="height:' + ph + 'px;"';
+ }
+
+ this.normalHTML += '<div class="doubleThumb' + c + '" page="' + i + '" data-pages="' + pages.join(',') + '"' + dth + '>' + ix;
this.normalHTML += '</div>';
}
this.normalHTML += '</div></div></div>';
#indexView {
min-width: 100%;
height: 100%;
- overflow-x: auto;
- padding: 25px;
+ overflow: hidden !important;
#indexViewHolder {
+ min-width: 100%;
+ max-width: 100%;
+ overflow-x: auto;
+ overflow-y: hidden;
margin-top: 5px;
+ position: relative;
+ height: 100%;
+ white-space: nowrap;
+ padding: 25px 20px;
+
+ .ps__rail-x {
+ margin:0 25px;
+ transform: translate(0, -25px) !important;
+ opacity: 1 !important;
+ }
}
}
+
+ .thumb {
+ &:before {
+ display: none;
+ }
+
+ box-shadow: 0 0 5px rgba(0, 0, 0, .3);
+ }
}