Skip to content

Commit

Permalink
Fix problem that invalid scrollbar height when content height is clos…
Browse files Browse the repository at this point in the history
…e to view height.

cf. DominikSerafin#11 (comment)
  • Loading branch information
jhlee8804 authored Feb 25, 2019
1 parent 621b66b commit f91bd05
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions vuebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,11 @@
if (state.visibleArea >= 1) {
state.barHeight = 0;
} else {
state.barHeight = Math.min(
state.el2.clientHeight / 2,
Math.max(state.el2.clientHeight * state.visibleArea, state.config.barMinHeight)
);
state.barHeight = state.el2.clientHeight * state.visibleArea;

if (state.barHeight < state.config.barMinHeight) {
state.barHeight = state.config.barMinHeight;
}
}
}

Expand Down

0 comments on commit f91bd05

Please sign in to comment.