Skip to content

set visibleDotCount as even numbers #16

Open
lferruzzi opened this issue Oct 11, 2018 · 2 comments
Open

set visibleDotCount as even numbers #16

lferruzzi opened this issue Oct 11, 2018 · 2 comments

Comments

@lferruzzi
Copy link

Firstly, thank you for the project.
I was trying to set the visibleDotCount property as 4 and noticed that on the code force to be an odd number, is there any reason for that? Is there any plans to add this as a feature?

@N-Olifer
Copy link
Contributor

Hi!
Implementation doesn't allow even visibleDotCount now, because center dot is considired selected (when there are actually more dots than visibleDotCount), and for even visibleDotCount there wouldn't be one center dot. So some significant refactoring is needed to allow it.

If you use indicator horizontally centered on screen, you probably wouldn't need even visibleDotCount. What kind of layout are you going to implement?

@lferruzzi
Copy link
Author

I see, I checked the code and tried to change it by myself and found out that it would require a big change.
The idea is to make a pager with the horizontally centered indicator at the bottom, but the designers would like a maximum of four dots to appear, making an analogy with a previous layout. For now I'm using five and it's working fine, but I was also curious to know the reason of this limitation, thank you so much for the answer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants