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

Not correct position of step markes and labels #266

Open
zheoreh opened this issue Jun 2, 2022 · 3 comments
Open

Not correct position of step markes and labels #266

zheoreh opened this issue Jun 2, 2022 · 3 comments

Comments

@zheoreh
Copy link

zheoreh commented Jun 2, 2022

const stepLength = this.props.sliderLength / (this.optionsArray.length - 1);

It works correct when I specify [0, 20, 40, 60, 80, 100]
but it doesn't work correct when I specify [0, 90, 100]

Screenshot 2022-06-02 at 18 22 02

Oh, there is some other issue. The value changes from 0 to 90 when I just moved the marker for 1/4 of the track... Though it's correct because I moved for more then half of the path between two points, but marker must be moved to the target point, otherwise it looks strange

@zheoreh
Copy link
Author

zheoreh commented Jun 2, 2022

I found snapped prop to resolve the last issue. It should be enabled by default when optionsArray prop is specified to avoid misunderstandings =)

@Haider-Ali-7
Copy link

Hi, how you manage to get placeholder dots like at 90. I want to achieve similar.

@AlixH
Copy link

AlixH commented Sep 9, 2022

He probably used the optionsArray prop along with showStep, showStepMarkers and showStepLabels

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

No branches or pull requests

3 participants