rangeslider.js icon indicating copy to clipboard operation
rangeslider.js copied to clipboard

Implemented RTL feature.

Open NayanKhedkar opened this issue 7 years ago • 17 comments

$r.rangeslider({ polyfill: false, isRTL:true,//set this property to true for RTL feature
onSlide:onSlideEnd });

NayanKhedkar avatar Dec 19 '16 09:12 NayanKhedkar

Hi, can anybody please go through this PR

NayanKhedkar avatar Jan 16 '17 05:01 NayanKhedkar

@NayanKhedkar first of all thanks for ur PR!

I would prefer a solution where u can set an attribute for the direction. To be more flexible and consistent with the data-orientation attribute which already exists.

e.g. <input type="range" data-direction="rtl">

We should also consider the orientation of the element in combination with the direction.

andreruffert avatar Jan 18 '17 16:01 andreruffert

@andreruffert hearty thanks! But I think this feature not implemented yet in rangeslider.js .

NayanKhedkar avatar Jan 19 '17 05:01 NayanKhedkar

rangeslider

When the orientation is horizontal and I set <input type="range" data-direction="rtl"> but I unable to see the output like above image.

NayanKhedkar avatar Jan 19 '17 06:01 NayanKhedkar

@NayanKhedkar yep the feature is not implemented so far. I was thinking about if you could refactor your implementation like I described above to be more flexible by using

<input type="range" data-direction="rtl">

instead of

$r.rangeslider({
polyfill: false,
isRTL:true, //set this property to true for RTL feature
onSlide:onSlideEnd
});

andreruffert avatar Jan 22 '17 15:01 andreruffert

@andreruffert sure .

NayanKhedkar avatar Jan 23 '17 04:01 NayanKhedkar

@andreruffert as you suggested I refactored implementation on the same PR . Supported data-directions are 1.right-to-left e.g. <input type="range" data-direction="rtl"> 2.left-to-right e.g. <input type="range" data-direction="ltr">default for horizontal orientation.
3.top-to-bottom e.g. <input type="range" data-direction="ttb"> 4.bottom-to-top e.g. <input type="range" data-direction="btt"> default for vertical orientation.

Please look at once to this PR,and if you have any additions, corrections or suggestions, please let me know.

NayanKhedkar avatar Jan 24 '17 13:01 NayanKhedkar

@andreruffert I would appreciate that you're busy at the moment. As you said I made the changes. Could you please look into the changes?

NayanKhedkar avatar Feb 21 '17 15:02 NayanKhedkar

@NayanKhedkar It's very hard to diff the style, as you've added two extra spaces to every single line, whether or not it was modified. Can you revert that change and follow the existing file's coding style of only using 2 spaces for indentation instead of 4? That will make the diff much smaller and focus only on your actual changes.

Not only that, but there's an extra space (9 in total) on this line: https://github.com/andreruffert/rangeslider.js/pull/245/files#diff-21d11fb857fabcd9805d3e86413a1c49R453

peteygao avatar Feb 28 '17 21:02 peteygao

@peteygao Thanks , I have removed the extra spaces.Could you please review the changes . . .?

NayanKhedkar avatar Mar 01 '17 08:03 NayanKhedkar

@peteygao Hi, I hope so this time is better.

NayanKhedkar avatar Mar 03 '17 05:03 NayanKhedkar

Hi, I'm looking forward to feedback.

NayanKhedkar avatar Apr 19 '17 10:04 NayanKhedkar

@andreruffert @peteygao how is this looking now? keen to get this merged as we use this excellent library in https://github.com/adaptlearning/adapt-contrib-slider and would love to have it updated properly rather than having to hack our copy!

moloko avatar Jun 26 '17 13:06 moloko

@NayanKhedkar Thank you so much!!!! <3

elron avatar Oct 08 '17 18:10 elron

How's it looking for a merge for this?

On a sidenote: The data-direction method is nice, but a programmatic way to set the direction either on init or via method would be very useful as well.

kontur avatar Jan 19 '18 11:01 kontur

Thanks for the hard work! Any chance for a merge on this at some point soon?

pbredenberg avatar Feb 07 '18 18:02 pbredenberg

Great work on all of this! Is there any status on when this will be merged and released?

jimjenkins5 avatar Dec 26 '18 13:12 jimjenkins5