eskimoblood / jim-knopf

:o: small JavaScript library to create knobs using SVG
http://eskimoblood.github.com/jim-knopf/
199 stars 44 forks source link

[FEATURE] Knobs will act like a vertical slider #12

Open TimSusa opened 5 years ago

TimSusa commented 5 years ago

Hi,

I would like to adopt your knobs to my application: https://github.com/TimSusa/midi-sliders If you like, you can give it a try and tell me, what you think of it.

I wonder, how it would be possible to make the knobs only react on y-direction. Please note, that a knob in a DAW like Ableton Live or Traktor DJ Software, for example, would all have the same kind of reaction. They just act like a vertical slider. People, who produce music are get to used to this.

Best Regards,

Tim Susa.

eskimoblood commented 5 years ago

The main problem is that your app is using react. So you would need to wrap every knob in a portal. I started to port it to react some years ago put lost the interest, maybe I should restart it.

Adding the behaviour you describe should be not a big deal as you only need to measure the distance on the y axis and convert this into an angle.

eskimoblood commented 5 years ago

@TimSusa sorry for the late reply (and also for not joining your team) I've rebuild the library with react (16.8.0-alpha.1, as I wanted to play with hooks) so it would be possible to use in your project. Still no y-direction support yet. Maybe you can create an issue there and describe a bit how it should behave.