bootstrap-slider
bootstrap-slider copied to clipboard
reversed: true should reverse what is in-selection classes
specifically when using an orientation: "vertical" slider. I would expect that reverse: true would cause in-selection to fill up from the bottom, not just reverse the labels.
Is there an easy way to do this that I'm missing?
https://jsfiddle.net/5x7LLtbc/1/
Thinking about this more, this is probably intended behavior. That said, I'm fairly certain it's not possible to do what you're asking. Reverse is doing just what it's supposed to - reversing the slider. You still drag from left to right (or in this case, top to bottom). We don't have any case where the slider goes from right to left or bottom to top.
Feature request? Right to left might be a little strange, but bottom to top I think is useful. My UI will be like filling up a thermometer.
What would it be called?
Weird as though it may be, it would have to support both cases. Probably something like reverseSlider would be fine, the documentation for both would have to be very clear on what each option does, though, and reverseSlider would also set reverse to true (otherwise it wouldn't make any sense).
yea i see what you mean. I would agree with @seiyria that the documentation would have to be explicit for this option and should include an example on our examples page (/tpl/index.tpl)
Agreed, it should be implement for both horizontal and vertical.
Yes, docs would have to be clear. I don't think the implicit link makes sense. All four cases below seem valid to me:
3 to 5 selected on the right/high side of the range
reverseSlider, but not reverse
|-O-O-0=0=0=|
1 2 3 4 5
1 to 2 selected on the left/low side
neither reverse nor reverseSlider
|=0=0-O-O-O-|
1 2 3 4 5
1 to 3 selected on the right/low side of the range
reverseSlider, and reverse
|-O-O-0=0=0=|
5 4 3 2 1
4 to 5 selected on the left/high side of the range
reverse, but not reverseSilder
|=0=0-O-O-O-|
5 4 3 2 1
Sure. I looked around at a few sliders and I've seen them support it as well. I still think it's strange but I won't let that get in the way of potential features.
Any update regarding this issue?
No, but we're happy to accept a PR for this!
adding selection: 'after' did the job