if (shade) {
s = '<div class="shade"></div>';
}
- return this.loadThumb(page, function () {
- }).get(0).outerHTML + s;
+ return '<div class="pageholder">' + this.loadThumb(page, function () {
+ }).get(0).outerHTML + s + '</div>';
},
// getThumbImage: function (page, div, shade, width) {
useBothWheelAxes: true
});
$("#indexViewHolder").find('.ps__rail-x').addClass('ps--clicking');
+
+ // Cut tall pages
+ $("#indexViewHolder .pageholder.cut").css('max-height', null).removeClass('cut');
+ var scrollAmount = Math.max(0, $("#indexView").outerHeight() - parseFloat($(".mview .content").css('max-height')));
+ console.log('scrollamount', scrollAmount);
+ if (scrollAmount > 0) {
+ var tallerHeight = 0;
+ $("#indexViewHolder .pageholder img").each(function () {
+ tallerHeight = Math.max(tallerHeight, $(this).outerHeight())
+ });
+ console.log(tallerHeight);
+ var cutHeight = tallerHeight - scrollAmount;
+ console.log(tallerHeight, cutHeight);
+ $("#indexViewHolder .pageholder img").each(function () {
+ if ($(this).outerHeight() > cutHeight) {
+ var holder = $(this).closest('.pageholder');
+ holder.addClass('cut').css('max-height', cutHeight);
+ holder.closest('.thumb').css('height', cutHeight);
+ holder.closest('.doubleThumb').css('height', cutHeight);
+ }
+ })
+ }
+
},
}
\ No newline at end of file