Skip to content

Commit

Permalink
fix: check overflow zero
Browse files Browse the repository at this point in the history
  • Loading branch information
SevereCloud committed Oct 3, 2023
1 parent 12a9158 commit 670d042
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ function doScroll({

onScrollStart();

/**
* Если окончание прокрутки вышло за ноль
*/
if (startScrollLeft * endScrollLeft < 0) {
endScrollLeft = 0;
}

if (Math.abs(endScrollLeft) >= Math.abs(extremeScrollLeft)) {
onScrollToEndBorder();
endScrollLeft = extremeScrollLeft;
Expand Down

0 comments on commit 670d042

Please sign in to comment.