joshjg / react-canvas-knob

Flexible knob/dial input component
MIT License
44 stars 28 forks source link

Knob width can be calculated as a percentage of window width #10

Closed oliviaboni closed 6 years ago

oliviaboni commented 7 years ago

Hi @joshjg, I'm using this knob in an app I'm working on and I needed it to be responsive. Here's a quick solution I came up, where, if the width is 1 or less, it is taken as a percentage of window.innerWidth. Works for me. Great resource! Thanks

dschu-lab commented 7 years ago

Hey @oliviaboni, I've also made a pull request, to update the knobs dimensions, when it's needed.

Maybe this could help you, too. 🥂

joshjg commented 7 years ago

@oliviaboni @dschu-lab Sorry for the wait. Merged @dschu-lab's PR. Will keep this open for now - let me know if you think this is still necessary.