nexus-js/ui

Multislider: Set Slider Min/Max Beyond Slider Bounds

Opened this issue · 7 comments

When setting a slider, it would be useful to be able to drag outside the top/bottom bounds of the slider to more easily get the min/max slider values. Currently, you have to be very exact and intentional to be able to get the min/max values set.

I know what you mean, and this is a good suggestion. It would take some adjustment of how the multislider is implemented. (Currently it is simply a collection of Nexus.Sliders, which is great for inheritance and maintenance but it does create this problematic aspect.) I'll aim to revise this in the next round of updates.

Hi Andrej, wanted to let you know that I have a revision of the multislider on the way soon. It will have the same overall API but will be a single SVG implementation as opposed to a collection of nexusui sliders. This will make it a bit easier to interact with.

Hi Ben,
That's great news! Looking forward to using it. Thank You

Just posted that update, it is version 2.0.10 now:

https://nexus-js.github.io/ui/api/#Multislider

Would be delighted if you would try this out and let me know of if you find any bugs or inconsistencies. The interaction should be easier. I also added an optional smoothing setting for if you are using the multislider to do waveform drawing or envelope drawing.

I can see a few updates that would still be nice but this will get us started on improving the multislider.

This is feeling great overall! The smoothing option is awesome!
One thing that i noticed is the removal of the 'multislider.interacting' param, is 'hasMoved' basically the same thing in this new version?

Will test it out more and let you know if i find any issues.
Thank You for all your work on this.

multislider.clicked is a boolean that turns to true when a user presses on the multislider, and turns to false when the user releases from that interaction. (This is true of most of the interfaces, actually). I think that ought to provide what you're after.

I did notice that the setting for numberOfSliders is not in use at the moment and really should be, to make an easy way for someone to create a multislider with 100 sliders without initializing all the values. Will look to update this and a few other things.

BTW, I now have a 'donate' button on the homepage for folks to support this project. If you all use this for anything for-profit at KMI, please consider chipping in to help with further development of this project!

Good to know, hasMoved is what i was after. I agree that numberOfSliders would be nice to have again, I've been setting all the values on instantiation so it hasn't been an issue for me.
I just made a personal donation to the project.
Thanks again for your work on NexusUI