fix: 🐛 scroll for rtl direction (#111)
This commit is contained in:
parent
a0901768d7
commit
279a876f7d
@ -48,9 +48,7 @@ export default class Style {
|
|||||||
this._settingHeaderPosition = true;
|
this._settingHeaderPosition = true;
|
||||||
|
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
const { scrollLeft, scrollWidth, clientWidth } = e.target;
|
const left = -e.target.scrollLeft;
|
||||||
|
|
||||||
let left = this.options.direction === 'rtl' ? scrollWidth - clientWidth - scrollLeft : -scrollLeft;
|
|
||||||
|
|
||||||
$.style(this.header, {
|
$.style(this.header, {
|
||||||
transform: `translateX(${left}px)`
|
transform: `translateX(${left}px)`
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user