A Premiere pro style Scrollbar UI component
with @orange4glace/guide
$ npm install --save @orange4glace/biscrollbar
<script src="./biscrollbar.min.js"></script>
import { BiScrollbar } from 'lib/biscrollbar';
const container = document.getElementById('container');
container.style.width = '100%';
container.style.height = '20px';
const sc = new BiScrollbar(container);
sc.layout(container.offsetWidth, container.offsetHeight);
sc.setSize(2000);
sc.setRagne(1400, 1600);
sc.pivot = 1500;
sc.pivottingOnlyPivotVisible = true;
const disposable = sc.onChange(() => {
console.log('Changed', sc.start, sc.end);
});
disposable.dispose();