(diff)
| 482 | const leftDiff = parentLeft - tabLeft; |
| 483 | |
| 484 | const scrollSpeed = (diff) => { |
| 485 | const t = Math.min(diff / tabWidth, 1); |
| 486 | const eased = t * t; |
| 487 | return MIN_SCROLL_SPEED + eased * (MAX_SCROLL_SPEED - MIN_SCROLL_SPEED); |
| 488 | }; |
| 489 | |
| 490 | if (leftDiff > 0 && scrollX > MIN_SCROLL) { |
| 491 | scroll = -scrollSpeed(leftDiff); |