Ver código fonte

debug

master
Pascal Gloor 5 anos atrás
pai
commit
dcbb073f6d
1 arquivos alterados com 1 adições e 4 exclusões
  1. 1
    4
      www/js/autodoc.js

+ 1
- 4
www/js/autodoc.js Ver arquivo

@@ -56,15 +56,11 @@ function change_page() {
}

function isvisible(obj) {
console.log(obj);
var top_of_element = $(obj).offset().top;
var bottom_of_element = $(obj).offset().top + $(obj).outerHeight();
var bottom_of_screen = $(window).scrollTop() + $(window).innerHeight();
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) {
return true;
}
@@ -136,6 +132,7 @@ function document_load() {

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

Carregando…
Cancelar
Salvar