mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #198] [MERGED] Scroll acceleration for macOS #365
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#365
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/198
Author: @remorses
Created: 10/3/2025
Status: ✅ Merged
Merged: 10/6/2025
Merged by: @kommander
Base:
main← Head:scroll-acceleration📝 Commits (8)
ed69372example implementation donec494c66nicer scroll example6ece618enable on mac4dbc353better paramterse4612d4d(t) = v₀ * ( t + A * (exp(t/τ) - 1 - t/τ) ).a0b8b07format9c81551add test. create interface for scroll accelbb2c3edMerge upstream/main into scroll-acceleration📊 Changes
5 files changed (+251 additions, -15 deletions)
View changed files
📝
packages/core/src/lib/index.ts(+1 -0)➕
packages/core/src/lib/scroll-acceleration.ts(+97 -0)📝
packages/core/src/renderables/ScrollBox.ts(+29 -4)📝
packages/core/src/tests/scrollbox.test.ts(+49 -3)📝
packages/react/examples/scroll.tsx(+75 -8)📄 Description
This PR adds scroll acceleration, enabled by default for macOS
Without acceleration, notice that all scrolls are the about the same speed
https://github.com/user-attachments/assets/7913e603-ba37-416c-bb22-02ae629c2648
With acceleration, notice some scolls are faster, in those cases I moved the mouse wheel faster
https://github.com/user-attachments/assets/bb7f2b86-17fa-473d-bded-1d0cdee803c2
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.