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
Add Reverse Option #317
Add Reverse Option #317
Conversation
8b2079f
to
1e3ffdf
Compare
@IonDen Re-based to 2.1.2 |
Hello, thanks. I will check this on next weekend i think. |
@@ -499,7 +509,7 @@ | |||
|
|||
if (this.options.type === "single") { | |||
this.$cache.cont.append(single_html); | |||
this.$cache.edge = this.$cache.cont.find(".irs-bar-edge"); | |||
this.$cache.edge = this.$cache.cont.find(".irs-bar-edge").toggleClass('reverse', this.options.reverse); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please separate this from caching items.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay to separate into a different line ?
this.$cache.edge.toggleClass('reverse', this.options.reverse);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. But move it out of this code block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will duplicate the check, since it's only required in case of single slider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. Abstraction is always better.
@MohammadYounes please check comments to code. |
@IonDen all updated! I hope I didn't miss anything :) |
@MohammadYounes, also please create several demos here http://jsfiddle.net/IonDen/09u17wg7/ (change original file with yours). To check if everything is ok. |
The gap only appears on certain screen sizes
@IonDen some demos as requested http://jsfiddle.net/gajt6a51/1/ |
@MohammadYounes, very good. Tnx. I will try to do final review on weekend. |
Please merge this. |
Hi guys, i'm in the middle of moving process and can't merge this right now. But if you really need reverse, you can use this pattern: http://jsfiddle.net/IonDen/wawgd9w2/ |
@IonDen |
@mrjonny2 for this specific case, just add min http://jsfiddle.net/9x9mt9zu/1/ |
@mrjonny2, for negative values it is a little bit tricky. |
Thank you!! |
Will be available in 3.0 |
Fixes #234
Using the
prettify
reverse method won't do the trick when working withfrom
andto
values.It will require extra work to reverse inputs too, for example: Fixing to value should fix the upper bound and release the lower bound.
I approached this by reversing the UI only, which also makes it usable in a Right-to-Left layout with ease.
Not sure if this going to be merged or not! so I only reversed the HTML5 skin, other skins reversal should be straight forward!
TODO:
Thanks