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

Position of the thumb when at the start and end of the bar #21

Closed
suragch opened this issue Aug 11, 2021 · 2 comments
Closed

Position of the thumb when at the start and end of the bar #21

suragch opened this issue Aug 11, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@suragch
Copy link
Owner

suragch commented Aug 11, 2021

Issues #13 and #15 affected where the thumb is drawn when at the start or end of the bar.

Currently the center of the thumb goes all the way to the ends of the bar. That means the thumb radius will draw outside of the widget area.

Screen Shot 2021-08-11 at 12 12 54 PM

However, between #13 and #15 the thumb radius was aligned with the bar like so:

Screen Shot 2021-08-11 at 12 13 13 PM

I like that look because it lines up well with vertical labels. The disadvantage is that the thumb will not start moving until the current time passes the center of the thumb. Also it will stop moving one radius-width before the end of the song. Usually this is only a few seconds, though, and for me I don't mind that.

So I'm thinking of adding an option to select where the thumb will align. I'll keep centered as the default since that is what it is now, but are there good API naming suggestions?

Perhaps this:

thumbAlign: ThumbAlignment.edge,
enum ThumbAlignment {
  center,
  edge,
}
@suragch suragch added the enhancement New feature or request label Aug 11, 2021
@ghost
Copy link

ghost commented Aug 11, 2021

I like the idea of having an option for this. For me personally, I prefer the current implementation (great when time labels are on sides), but some may not, so this is good observation.

Regarding API naming, the one you suggested seems fine to me.

@suragch
Copy link
Owner Author

suragch commented Aug 12, 2021

Version 0.9.0 adds this functionality. I adjusted the API, though.

this.thumbCanPaintOutsideBar = false,

@suragch suragch closed this as completed Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant