Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createBar(direction) {
const options = Object.assign(this.options.scrollbar, {
direction,
useCssTransitions: false,
keyboard: false,
clickMoveStep: 1
})
const $bar = document.createElement('div')
const api = new SCROLLBAR($bar, options)
if (this.options.showOnHover) {
addClass(this.classes.BARHIDE, $bar)
}
append($bar, this.$wrap)
this[`$${direction}`] = $bar
this[`$${direction}`].api = api
this.$bar.push($bar)
this.updateBarHandle(direction)
}
queryAll('.example-scrollbar-horizontal').map(element =>
Scrollbar.of(element, {
direction: 'horizontal',
handleLength: 100,
keyboard: true
})
)