We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 341e97e commit 82317d0Copy full SHA for 82317d0
carousel/carousel.js
@@ -98,9 +98,7 @@ export default class Carousel {
98
const delta = Math.abs(scrollport.offsetLeft - element.offsetLeft)
99
const scrollerPadding = parseInt(getComputedStyle(scrollport)['padding-left'])
100
101
- const pos = scrollport.clientWidth / 2 > delta
102
- ? delta - scrollerPadding
103
- : delta + scrollerPadding
+ const pos = delta - scrollerPadding
104
105
scrollport.scrollTo(dir === 'ltr' ? pos : pos*-1, 0)
106
}
0 commit comments