soundar24 / roundSlider

roundSlider - A free jQuery plugin
https://roundsliderui.com/
MIT License
264 stars 80 forks source link

Support simple horizontal/vertical swipe? Or transparent, wide scroll path? #4

Open jtara opened 9 years ago

jtara commented 9 years ago

Would it be possible to support simple horizontal or vertical scroll, rather than having to follow the circle path?

I find following the circle path a bit fiddly on touch-screens. (Actually, more than just a BIT fiddly, really unusably fiddly.) I suppose I could change the width of the arc, but then that will affect the visual appearance, and may look awkward, then.

Alternately, perhaps a wider (but transparent) arc could be used as the scroll target?

An alternative would be for me to display my own linear slider underneath, though I think that will seem strange to the user. And of course I can implement some simple swipe detection on the containing element and achieve linear swipe.

But at that point, I'm just using this to draw an arc. It does have some very nice options for drawing an arc...

soundar24 commented 9 years ago

I need some clarification from your requirement:

Are you mentioned the "handle" as "arc" ? So you don't need the handle to change the value, instead you try to change the value by swipe on the slider. Is this your requirement ?

I will check this and let you know the details.

jtara commented 9 years ago

Oh. I actually didn't realize you had to drag on the handle. I thought it was anywhere on the arc.

I do realize you can tap anywhere on the arc, and the handle will jump to that spot.

Yes, I'd like to swipe on the slider, but... not have to swipe in an arc. Just a simple horizontal or vertical swipe. It would be great if there were options for that.

It makes it less fiddly for touchscreen use, though it may require some user instruction.

soundar24 commented 9 years ago

Ok, i will check this requirement with swipe events.

jtara commented 9 years ago

FWIW, I find what jQuery.knob does acceptable, though it's not quite the same thing.

You do have to start the swipe on the arc (there is no requirement to drag a handle) and it will still work if you slide off of the arc during the drag. Depending on where you drag, it might do strange things, but generally acceptable and logical. If you swipe linearly, the action is a bit too fast but I guess that is just the nature of the beast. (Pi, and all that...) You can't start off of the arc, though, and, so I still think that a simple linear swipe is a useful option.

http://anthonyterrien.com/knob/

jtara commented 9 years ago

Oh, actually, I see with jQuery.know you actually can start a drag anywhere inside the arc, except that you can't start it in the input control. If you didn't have an input control, I suppose it would work as I wish.

soundar24 commented 9 years ago

@jtara, as per you requirement you need a swipe or similar event to change the value for touch devices. But the problem with swipe event is, we can't change the exact value by swipe.

So i have done some work around for this. Now you can change the value by touch anywhere on the slider or by drag on the slider.

Check this jsFiddle: http://jsfiddle.net/utqgufx0/13/

Here i have updated some sample level code (use this in your application also), so now i think it works as you expect.

jtara commented 9 years ago

Yes, that Fiddle works exactly as I wish. I think many will find that an attractive option!

soundar24 commented 9 years ago

Please check once in your side whether you have face any issue with this. If this is useful option then i will include this in the next release.

soundar24 commented 9 years ago

Issue solved. For v1.0 add a small workaround as mentioned like in the jsFiddle: http://jsfiddle.net/utqgufx0/13/

Now the scroll path supported in the whole slider area.

soundar24 commented 8 years ago

Need to add this functionality in source level, so i reopened this issue.