nexus-js / ui

NexusUI: Web Audio Interfaces
http://nexus-js.github.io/ui/
844 stars 130 forks source link

modify regex to support input of negative numbers to number component #182

Closed jamesstaub closed 4 years ago

jamesstaub commented 4 years ago

adds support for negative number input

jamesstaub commented 4 years ago

It seems to work fine when linked to a dial. If the dial's range is in the positive range, entering a negative in the number box will default to the lowest number in the dials range. If the dial is set with a negative minimum value, values in that range can be entered in the number box.

I'm not sure when those other math methods are called, but at a glance they look like they should support negative values just fine.

I modified the codepen from the docs to demonstrate. I was getting Nexus undefined error when trying to import the raw from my github, so I just pasted the minified build into the codepen script editor.

https://codepen.io/taylorbf/pen/owdpxy

mscottnelson commented 4 years ago

This looks good to me! Many thanks for the PR, and thanks for performing the sanity check. I've checked your sanity check and it all checks out and I'm giving this my green check mark. @tatecarson it looks like you are the primary maintainer at the moment. IMHO this is good to merge.

Since I haven't been active on this project, unless this is time critical for @jamesstaub in some way (is it?), I'll leave merging and revving to you @tatecarson.

jamesstaub commented 4 years ago

not super urgent, thanks!

tatecarson commented 4 years ago

Sorry this took so long! School just ended.