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

Suggestion: slider handle should be centered if no data-slider-value is set. #614

Closed
ruSauron opened this issue Aug 11, 2016 · 1 comment

Comments

@ruSauron
Copy link

ruSauron commented Aug 11, 2016

String 734:12 of bootstrap.js v 9.1.3:
defaultOptions: {
min: 0,
max: 10,
step: 1,
value: 5
}

Limesurvey (i'm not contributor) set data-slider-value="" to check user activity with sliders in last git version. If data-slider-value keeps empty that mean user didnt interract with slider.
Downside: data-slider-value will be set to 5 on the screen even if data-slider-max is 1000 and data-slider-min is 500.
Is it possible to change default "value" from 5 to Math.round((data-slider-max - data-slider-min)/2)? Actual max and min if they are set, not default 10 and 0. data-slider-value should be unchanged. Or can you provide a vay to check, did user interract with a slider?

@seiyria
Copy link
Owner

seiyria commented Aug 11, 2016

You can always attach a slide event to a slider and set a boolean to check if the slider was changed.

If you want the slider value to be "in the middle" you can set the value. There's no need for us to provide that.

@seiyria seiyria closed this as completed Aug 11, 2016
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

2 participants