Skip to content

Commit

Permalink
fixing variable name to not adding classname infinitely
Browse files Browse the repository at this point in the history
  • Loading branch information
sabdol committed Jan 22, 2024
1 parent 6946372 commit ee0489a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/perfect-scrollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,10 @@
let scrollBy = null;

function mouseMoveHandler(e) {
const y = e.touches && e.touches[0] ? e.touches[0].pageY : e[pageY];
const py = e.touches && e.touches[0] ? e.touches[0].pageY : e[pageY];

element[scrollTop] =
startingScrollTop + scrollBy * (y - startingMousePageY);
startingScrollTop + scrollBy * (py - startingMousePageY);
addScrollingClass(i, y);
updateGeometry(i);

Expand Down
4 changes: 2 additions & 2 deletions src/handlers/drag-thumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ function bindMouseScrollHandler(
let scrollBy = null;

function mouseMoveHandler(e) {
const y = e.touches && e.touches[0] ? e.touches[0].pageY : e[pageY];
const py = e.touches && e.touches[0] ? e.touches[0].pageY : e[pageY];

element[scrollTop] =
startingScrollTop + scrollBy * (y - startingMousePageY);
startingScrollTop + scrollBy * (py - startingMousePageY);
addScrollingClass(i, y);
updateGeometry(i);

Expand Down

0 comments on commit ee0489a

Please sign in to comment.