ScrollBar: cache bar width calculation

pull/5439/head
Leopoldthecoder 2017-06-13 20:12:16 +08:00 committed by 杨奕
parent 45628ecbf3
commit 869600f4d5
1 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ export default function() {
const widthWithScroll = inner.offsetWidth;
outer.parentNode.removeChild(outer);
scrollBarWidth = widthNoScroll - widthWithScroll;
return widthNoScroll - widthWithScroll;
return scrollBarWidth;
};