Commit 54d6cb33 by doszhang

dos

parent 53bd51d1
......@@ -174,7 +174,14 @@ function ruleScroll() {
let step = (39 * fontSize) / (scrollHeight * fontSize);
let scrollTop = $('.rule-block').scrollTop();
$('.scroll-bar').css('top', (7.9 * fontSize) + scrollTop * step + 'px');
let top = (7.9 * fontSize) + scrollTop * step;
if (top < (7.9 * fontSize)) {
top = 7.9 * fontSize;
} else if (top > (46.9 * fontSize)) {
top = 46 * fontSize;
}
$('.scroll-bar').css('top', top + 'px');
}, 5);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment