From 8f8e263977cc356bf754236ed0182515b26337ca Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Wed, 30 Oct 2013 11:06:27 -0400 Subject: [PATCH] CS fixes --- program/js/list.js | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/program/js/list.js b/program/js/list.js index a814c32..46d9d27 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -1245,14 +1245,15 @@ scroll_to = Number(row.offsetTop); } - if(this.fixed_header) + if (this.fixed_header) head_offset = Number(this.thead.offsetHeight); - + // if row is above the frame (or behind header) if (scroll_to < Number(this.frame.scrollTop) + head_offset) { // scroll window so that row isn't behind header this.frame.scrollTop = scroll_to - head_offset; - } else if (scroll_to + Number(row.offsetHeight) > Number(this.frame.scrollTop) + Number(this.frame.offsetHeight)) + } + else if (scroll_to + Number(row.offsetHeight) > Number(this.frame.scrollTop) + Number(this.frame.offsetHeight)) this.frame.scrollTop = (scroll_to + Number(row.offsetHeight)) - Number(this.frame.offsetHeight); } }, -- Gitblit v1.9.1