Minor cleanup
This commit is contained in:
parent
ac76db0052
commit
a89d8c0005
@ -275,14 +275,18 @@
|
||||
if (item) switch_status(item.getAttribute("data-item-id"));
|
||||
}
|
||||
|
||||
function scroll_page_to(item) {
|
||||
|
||||
function scroll_page_to(item)
|
||||
{
|
||||
var clientHeight = pageYOffset + document.documentElement.clientHeight;
|
||||
var itemPosition = item.offsetTop + item.offsetHeight;
|
||||
|
||||
if (clientHeight - itemPosition < 0 || clientHeight - item.offsetTop > document.documentElement.clientHeight) {
|
||||
scrollTo(0, item.offsetTop - 10);
|
||||
window.scrollTo(0, item.offsetTop - 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function set_links_item(item_id)
|
||||
{
|
||||
var link = document.getElementById("current-item");
|
||||
|
Loading…
Reference in New Issue
Block a user