Revert offset calculation, was working poorly.

This commit is contained in:
Robin Ward 2017-04-27 12:20:32 -04:00
parent a545117d2e
commit 5774a9a2c8
1 changed files with 0 additions and 3 deletions

View File

@ -36,9 +36,6 @@ export default function offsetCalculator(y) {
if (inter > ideal) { if (inter > ideal) {
const bottom = $('#topic-bottom').offset().top; const bottom = $('#topic-bottom').offset().top;
const switchPos = bottom - rawWinHeight; const switchPos = bottom - rawWinHeight;
if (scrollPercent >= 1.0) {
return 0;
}
if (scrollTop > switchPos) { if (scrollTop > switchPos) {
const p = Math.max(Math.min((scrollTop + inter - switchPos) / rawWinHeight, 1.0), 0.0); const p = Math.max(Math.min((scrollTop + inter - switchPos) / rawWinHeight, 1.0), 0.0);