Skip to content

Commit

Permalink
fix(track): call showTrack when position changed
Browse files Browse the repository at this point in the history
  • Loading branch information
idiotWu committed May 10, 2017
1 parent 2524964 commit d315413
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apis/set-position.js
Expand Up @@ -31,8 +31,8 @@ SmoothScrollbar.prototype.setPosition = function (
y = Math.round(y);
}

if (Math.abs(x - offset.x) > 1) this.showTrack('x');
if (Math.abs(y - offset.y) > 1) this.showTrack('y');
if (x !== offset.x) this.showTrack('x');
if (y !== offset.y) this.showTrack('y');

x = pickInRange(x, 0, limit.x);
y = pickInRange(y, 0, limit.y);
Expand Down

0 comments on commit d315413

Please sign in to comment.