Deleting somes unused parts from last commit

This commit is contained in:
unknown 2021-05-12 02:54:32 +04:00
parent 3cac2c4ee5
commit 38d87adbc0

View file

@ -373,28 +373,4 @@ function tweak_portal_when_in_iframe()
window.parent.location.href = logoutButton.getAttribute("href");
});
}
}
var lastY = 0; // Needed in order to determine direction of scroll.
$(".scroll-container").on('touchstart', function(event) {
lastY = event.touches[0].clientY;
});
$('.scroller').on('touchmove', function(event) {
var top = event.touches[0].clientY;
// Determine scroll position and direction.
var scrollTop = $(event.currentTarget).scrollTop();
var direction = (lastY - top) < 0 ? "up" : "down";
// FIX IT!
if (scrollTop == 0 && direction == "up") {
// Prevent scrolling up when already at top as this introduces a freeze.
event.preventDefault();
} else if (scrollTop >= (event.currentTarget.scrollHeight - event.currentTarget.outerHeight()) && direction == "down") {
// Prevent scrolling down when already at bottom as this also introduces a freeze.
event.preventDefault();
}
lastY = top;
});
}