Revert offset calculation, was working poorly.
This commit is contained in:
parent
a545117d2e
commit
5774a9a2c8
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue