app/js/jquery.twoup.js in storys-0.0.5 vs app/js/jquery.twoup.js in storys-0.0.6
- old
+ new
@@ -28,11 +28,11 @@
slider.animate({ "margin-left": -((twoup.page() - 1) * scroll_width) + "px" }, 300);
}).trigger('hashchange');
}
else {
$(window).bind('hashchange', function() {
- $("body").animate({ scrollTop: (twoup.page() - 1) * Math.max(0, $(window).height() - 60) }, 300);
+ $("body").animate({ scrollTop: (twoup.page() - 1) * Math.max(0, $(window).height() - 51 - 60) }, 300);
}).trigger('hashchange');
}
$(window).keydown(function(event) {
if(event.keyCode == 32 || event.keyCode == 39) {
@@ -75,11 +75,11 @@
twoup.pages = function() {
if(twoup.enabled()) {
return Math.ceil(content_width / scroll_width);
}
else {
- return Math.ceil($(document).height() / ($(window).height() - 60));
+ return Math.ceil($(document).height() / ($(window).height() - 51 - 60));
}
};
twoup.bound_page_number = function(number) {
var index = parseInt(number);
@@ -109,10 +109,10 @@
var old_columns = columns;
columns = twoup.columns();
var column_gap_width = (padding_width * 2) + parseInt(content.css("-webkit-column-rule-width") || content.css("column-rule-width"));
var wrapper_width = window.innerWidth;
- var wrapper_height = window.innerHeight;
+ var wrapper_height = window.innerHeight - 51;
var inner_width = wrapper_width - (padding_width * 2);
var inner_height = wrapper_height - (padding_width * 2);
var column_width = Math.floor((inner_width - (column_gap_width * (columns - 1))) / columns);
scroll_width = inner_width + column_gap_width;