Skip to content

Commit 573b521

Browse files
committed
- UI: smooth scrolling fixes.
1 parent adc6b04 commit 573b521

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

main/playlist_manager/playlist_manager_list.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
//16/03/26
2+
//04/04/26
33

44
/* exported _list */
55

@@ -1538,6 +1538,7 @@ function _list({ x, y, w, h, properties } = {}) {
15381538
if (!Number.isInteger(s)) { s = Math.round(s); }
15391539
if (this.scrollSettings.bSmooth && bSmooth && scrollBar && scrollBar.bDrag) { smoothScroll.stop(); }
15401540
if (this.scrollSettings.bSmooth && bSmooth && (!scrollBar || !scrollBar.bDrag)) {
1541+
smoothScroll.stop();
15411542
const timer = smoothScroll.timer;
15421543
const delta = Math.min(Math.abs(s * scrollDelta), this.items);
15431544
if (delta > 1) {
@@ -1558,7 +1559,7 @@ function _list({ x, y, w, h, properties } = {}) {
15581559
Math.ceil(delta * 2 / 10),
15591560
Math.ceil(delta * 3 / 10),
15601561
Math.ceil(delta * 4 / 10),
1561-
delta - Math.ceil(delta * 1 / 10) - Math.ceil(delta * 2 / 10) - Math.ceil(delta * 3 / 10) - Math.ceil(delta * 4 / 10)
1562+
Math.max(delta - Math.ceil(delta * 1 / 10) - Math.ceil(delta * 2 / 10) - Math.ceil(delta * 3 / 10) - Math.ceil(delta * 4 / 10), 0)
15621563
].filter(Boolean).forEach((step) => smoothScroll.steps.push(step));
15631564
new Promise((resolve, reject) => {
15641565
smoothScroll.steps.reduce((prev, curr) => {

0 commit comments

Comments
 (0)