Skip to content

Slider value is crossing the ceil #417

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

Closed
sushantt2099 opened this issue Sep 26, 2016 · 4 comments
Closed

Slider value is crossing the ceil #417

sushantt2099 opened this issue Sep 26, 2016 · 4 comments
Labels

Comments

@sushantt2099
Copy link

sushantt2099 commented Sep 26, 2016

Steps to reproduce

  1. Use the following option to initialise the slider
vm.priceSlider = {
        value: 200,
        options: {
            floor: 1,
            ceil: 700,
            showTicksValues: 70,
            // translate: (value) => {
            //     if(value > 1) return value - 1;
            //
            //     return value;
            // },
            showSelectionBar: true
        }
    }

Demo: http://jsfiddle.net/gfk1hzLp/ (fork this example and update the link)

Expected behaviour

The upper limit should not cross the ceil. The tick value label should also not cross the ceil

Actual behaviour

The upper limit is crossing the ceil, the tick value label is also crossing the ceil

@ValentinH
Copy link
Member

Yes this is a known issue with showTicks values that don't fit perfectly in the range. However, the upper limit isn't crossing the ceil as you said.

This option should be used with a correct value that matches the range:
(ceil - floor) % showTicks == 0.

@sushantt2099
Copy link
Author

sushantt2099 commented Sep 26, 2016

Hi, the upper limit does cross the ceil if you click on the last tick point(not sliding the slider). This happens randomly not all the time.
screen shot 2016-09-26 at 3 57 08 pm

@ValentinH
Copy link
Member

Still, your range doesn't match the ticks value you specified.

@ValentinH
Copy link
Member

@sushantt2099 I have work on a ticks refactoring that enables to position ticks at specific position: #426. Do you think it would match your needs?

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

No branches or pull requests

2 participants