jrckln / Bendyourspline

2 stars 0 forks source link

Multihandle slider #1

Closed matherealize closed 3 years ago

matherealize commented 3 years ago

Today we discussed that it would be interesting to set the knots of a spline using a single input slider, but with multiple handles, instead of having multiple sliders which basically act on the same scale. I think this is a good idea. However, this is neither directly possible in shiny itself, nor in shinyWidgets, but it is trivial in jquery / javascript itself.

I have tried this in a minimal shiny app (owncloud), and it does seem to work - we can define the number of handles, and drag them to obtain a list of values as output.

@ljiricka Do you think this is difficult to implement in a shiny app (css needs to be adapted, additional? jquery dependency, potential bugs, dynamic creation of number of handles according to user choice regarding number of knots)? Maybe shinyjs would make it easier to implement this, but I don't really know how to use it.

I could pursue this further if we find it a good input method and want to use it.

PS: Be aware, I don't know exactly what all the code in javascript is doing, it was copied from various sources...

jrckln commented 3 years ago

I think its really nice and tried to integrate it but failed completely. What about you show the slider tomorrow and we see what the others think? Because if not everybody loves it i think it would be way too much work.