Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n-scrollbar support "scrollBy" #2435

Closed
pizberg opened this issue Feb 17, 2022 · 3 comments
Closed

n-scrollbar support "scrollBy" #2435

pizberg opened this issue Feb 17, 2022 · 3 comments
Labels
feature request New feature or request priority: high

Comments

@pizberg
Copy link

pizberg commented Feb 17, 2022

This function solves the problem (这个功能解决的问题)

control scrollbar with mouse scroll, example, transmit y-scroll to x-scroll

Expected API (期望的 API)

scrollBy

@github-actions github-actions bot added the feature request New feature or request label Feb 17, 2022
@Sepush
Copy link
Collaborator

Sepush commented Feb 17, 2022

@pizberg
Copy link
Author

pizberg commented Feb 17, 2022

https://www.naiveui.com/en-US/os-theme/components/scrollbar#Scrollbar-Methods use scrollTo

scrollTo is used to a fixed x/y position, but how to scroll a relative distance. e.g. scroll back -10px

@pizberg
Copy link
Author

pizberg commented Feb 18, 2022

by the way, is there any build-in method to get current scrollbar x/y position and the whole width/height of the bar?
if above mentioned method is available, the relative scrolling also could be controlled.

jaulz pushed a commit to jaulz/naive-ui that referenced this issue Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request priority: high
Projects
None yet
Development

No branches or pull requests

3 participants