Fixed several issues with the knob control. #356
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Control now gracefully handles empty input, falling back to zero
instead of NaN.
The control now also handles 'wheel' events instead of only
'mousewheel' and 'DOMMouseScroll' events.
Modern browsers use the W3C standard 'wheel' event when reporting
scroll wheel events.
This also prevents the site from scrolling when the cursor is over
a knob and the mouse wheel or track pad scrolling is actuated.
Previously, the web site would scroll away under the cursor as the
user tried to actuate a knob with the scroll wheel or track pad,
since the event was not properly captured.
Increased the timeout for detecting mouse wheel stops from 100 ms
to a more graceful 250 ms, which often works better.
Removed the second timer (mwTimerRelease), since it messes things up.
Added more key codes allowed for input, since the original set
turned out too restrictive.
Removed the speedup on long key presses, since this does not actually
cause the increment to speed up, but instantly skips to the end of
the range (min/max value) on a long press.