noUiSlider icon indicating copy to clipboard operation
noUiSlider copied to clipboard

Combine three behaviors

Open bo2star opened this issue 8 years ago • 5 comments

I would like to use three behaviors, 'fixed-drag-tap'. So, it's similar to 'fixed-drag', but it'is able to tap on slider and it should move fixed range to that tap position.

I tried 'fixed-drag-tap' for behavior option, but it down't support 'fixed' behavior.

bo2star avatar Nov 08 '15 23:11 bo2star

This makes sense. I'll have to see about how to implement this, though.

leongersen avatar Nov 29 '15 19:11 leongersen

+1 on this.

Would like an option to get something like this:

  • dragging handles resizes range
  • dragging range moves the range, preserving it's size
  • tapping outside moves the range, preserving it's size

darkalor avatar Jul 25 '16 09:07 darkalor

I'm also trying to get this to work. For now, I'm trying to find a workaround with the event system, but it's a bit tricky to tell the difference between events generated by dragging and events generated by tapping.

cuchaz avatar Feb 25 '20 15:02 cuchaz

I'd be open for a pull request on this feature!

To give some pointers, the option would be handled here, and the tap event would need to be aware of the fixed behaviour.

leongersen avatar Feb 28 '20 08:02 leongersen

Hi there,

I worked on this for a little bit more actually. Sadly, I couldn't find the right combination of event handlers that did what I wanted though. As soon as I turned on the tap behavior to get tap events, the nearest slider handle would move and break the fixed range. But as soon as I turned off the tab behavior, I couldn't get events from tapping anymore.

I eventually realized that an actual browser scrollbar was a better widget for what I was trying to do there, so I stopped using the slider in that spot entirely.

The sliders work really well in the other place where I use them though, so nice job with the library! =)

cuchaz avatar Feb 28 '20 19:02 cuchaz