Browse Source

debug

master
Pascal Gloor 5 years ago
parent
commit
dcbb073f6d
1 changed files with 1 additions and 4 deletions
  1. 1
    4
      www/js/autodoc.js

+ 1
- 4
www/js/autodoc.js View File

} }


function isvisible(obj) { function isvisible(obj) {
console.log(obj);
var top_of_element = $(obj).offset().top; var top_of_element = $(obj).offset().top;
var bottom_of_element = $(obj).offset().top + $(obj).outerHeight(); var bottom_of_element = $(obj).offset().top + $(obj).outerHeight();
var bottom_of_screen = $(window).scrollTop() + $(window).innerHeight(); var bottom_of_screen = $(window).scrollTop() + $(window).innerHeight();
var top_of_screen = $(window).scrollTop(); var top_of_screen = $(window).scrollTop();


console.log("screen: " + top_of_screen + " " + bottom_of_screen);
console.log("elem: " + top_of_element + " " + bottom_of_element);

if (bottom_of_screen > top_of_element && top_of_screen < bottom_of_element) { if (bottom_of_screen > top_of_element && top_of_screen < bottom_of_element) {
return true; return true;
} }


function page_home_scroll() { function page_home_scroll() {
if (isvisible($(".autodoc_template_home_col").last())) { if (isvisible($(".autodoc_template_home_col").last())) {
console.log("scroll to page " + conf.home.curpage);
conf.home.curpage++; conf.home.curpage++;
document_load(); document_load();
} }

Loading…
Cancel
Save