Skip to content

Commit

Permalink
fix: πŸ› scroll for rtl direction (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
prssanna authored Sep 16, 2020
1 parent a090176 commit 279a876
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ export default class Style {
this._settingHeaderPosition = true;

requestAnimationFrame(() => {
const { scrollLeft, scrollWidth, clientWidth } = e.target;

let left = this.options.direction === 'rtl' ? scrollWidth - clientWidth - scrollLeft : -scrollLeft;
const left = -e.target.scrollLeft;

$.style(this.header, {
transform: `translateX(${left}px)`
Expand Down

0 comments on commit 279a876

Please sign in to comment.