1.0.3 • Published 3 years ago

@orange4glace/biscrollbar v1.0.3

Weekly downloads
2
License
MIT
Repository
-
Last release
3 years ago

Demo

with @orange4glace/guide

Installation

npm

$ npm install --save @orange4glace/biscrollbar

script

<script src="./biscrollbar.min.js"></script>

Example

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();