react-compound-slider icon indicating copy to clipboard operation
react-compound-slider copied to clipboard

Alternative drag and drop behavior

Open Kadrian opened this issue 5 years ago • 5 comments

Hi. Most of all, I just wanted to leave a note that this is an absolutely amazing component and wanted to show you what I've built with it.

Bildschirmfoto 2020-01-27 um 15 12 24

So thank you very much for building it and keep up the work!

Suggestion

Now if you look at my example above, I want to adjust the drag and drop behavior next. The default behavior is that you click the track and the nearest handle jumps to your mouse position. The behavior I'm looking for in my example is that you click and drag the entire track, which moves both handles left and right.

I thought it might be interesting to think about adding this as an optional drag and drop alternative maybe using something like defaultDrag = "jump-handles" | "move-track"

Kadrian avatar Jan 27 '20 14:01 Kadrian

Hey there. Nice. Thanks for telling me about this use case. I'm working on a new version that will let you have more control over these behaviors.

sghall avatar Jan 29 '20 12:01 sghall

Any updates on this, @sghall? Just checked the docs and don't see the option disable track click in favor drag, yet. Also, thanks for the awesome component.

rflprr avatar Jun 23 '20 20:06 rflprr

Hi @Kadrian . I also want to build something like this. Do you have open source example for it to refer to? Thank you.

zibrahimov avatar Apr 20 '21 12:04 zibrahimov

@zibrahimov sorry, it wasn't open source in this case

Kadrian avatar Apr 20 '21 15:04 Kadrian

@Kadrian Oh okay. Thanks. Is there any tip that you can give me about how you did it? Currently it accepts only one range per slider. Screen Shot 2021-04-20 at 19 39 58

zibrahimov avatar Apr 20 '21 16:04 zibrahimov