Commit 869600f4 authored by Leopoldthecoder's avatar Leopoldthecoder Committed by 杨奕

ScrollBar: cache bar width calculation

parent 45628ecb
......@@ -23,6 +23,7 @@ export default function() {
const widthWithScroll = inner.offsetWidth;
outer.parentNode.removeChild(outer);
scrollBarWidth = widthNoScroll - widthWithScroll;
return widthNoScroll - widthWithScroll;
return scrollBarWidth;
};
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 to comment