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

Validate selection slider values #3365

Merged
merged 2 commits into from
Feb 1, 2022
Merged

Commits on Feb 1, 2022

  1. Ensure that selection sliders return integer values for indices.

    According to the nouislider docs, it returns values to 2 decimal places, and the place to make sure we have integers is in the to transformation function.
    
    Fixes jupyter-widgets#3363
    jasongrout committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    da11b72 View commit details
    Browse the repository at this point in the history
  2. Ensure that slider values from nouislider are valid

    According to the nouislider docs, values are float by default, and you
    must convert them as desired in the to function.
    
    It seems that Math.round is more appropriate than Math.floor - the slider
    value might be just below the appropriate value instead of just above.
    jasongrout committed Feb 1, 2022
    Configuration menu
    Copy the full SHA
    05f63a0 View commit details
    Browse the repository at this point in the history