roundSlider icon indicating copy to clipboard operation
roundSlider copied to clipboard

Different positions for bar and handle

Open ChristianMayer opened this issue 9 years ago • 6 comments

It would be great when the position of the bar could be set independently from the slider/handle position like in this mock up: slider

Reason: Then the bar could show a currently measured value and the handle could display a set point.

ChristianMayer avatar Jan 24 '16 13:01 ChristianMayer

I am little bit confused with your requirement.. As you told, the bar will show the current value then the "handle display a set point" means ? (if i drag the handle then handle should move, then when you need to move the bar ?..) Can you please update briefly about this..

soundar24 avatar Jan 24 '16 15:01 soundar24

Ah sorry, this naming is coming from control theory.

Imagine you want to use this to set the room temperature. So you'd use the handle to set it to a position corresponding to the "set point" of the temperature. As the room doesn't have that temperature yet the heating has to do some work. The currently measured temperature of the room would then be shown by the bar.

At the end the bar position and the handle position must be able to move independently.

ChristianMayer avatar Jan 24 '16 17:01 ChristianMayer

Based on your description i created a sample with some workaround.. http://jsfiddle.net/soundar24/LpuLe9tr/237/

Just check this demo and confirm me whether this is your required behavior.. And don't worry about the sample level codes, once the behavior confirmed then i will include these in the source.

soundar24 avatar Jan 24 '16 19:01 soundar24

Generally it's fine.

Only that I can click on the bar and move the bar by mouse is a bit strange (it would be read only in my case). Especially that it's not really deterministic when it's moving the bar and when it's moving the handler. But I guess that's due to the hack :)

ChristianMayer avatar Jan 24 '16 20:01 ChristianMayer

Yes, that is due to the hack only.. I slightly changed the sample, now the bar is readonly.. and the bar can be changed through the code only.. And the handle can be move by drag.. http://jsfiddle.net/soundar24/LpuLe9tr/239/

Is this your requirement or you need any improvement in the UI or functionality ?

soundar24 avatar Jan 26 '16 18:01 soundar24

Great, that's working as required!

ChristianMayer avatar Jan 28 '16 21:01 ChristianMayer