jQuery-Knob icon indicating copy to clipboard operation
jQuery-Knob copied to clipboard

Fixed several issues with the knob control.

Open andrepxx opened this issue 7 years ago • 3 comments

  1. Control now gracefully handles empty input, falling back to zero instead of NaN.

  2. 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.

  3. Increased the timeout for detecting mouse wheel stops from 100 ms to a more graceful 250 ms, which often works better.

  4. Removed the second timer (mwTimerRelease), since it messes things up.

  5. Added more key codes allowed for input, since the original set turned out too restrictive.

  6. 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.

andrepxx avatar Mar 25 '18 12:03 andrepxx

can we use this library in angular 5?

DaoFof avatar Apr 11 '18 06:04 DaoFof

Probably you can.

Unfortunately, I can't give you support on that though. The control requires JQuery as a dependency, so if you can work with JQuery in your Angular project, you can probably work with this component.

You might also want to take a look at pure-knob, which implements a similar dial control, also with mouse, wheel and touch support, which has no dependencies. (So you do not need JQuery for it. It's just "vanilla" JS.) The repository is available from my profile or just search for pure-knob on GitHub. This might make things easier for you ... or perhaps not.

I'm sorry that I currently can't be more helpful. I'm just not familiar enough with Angular (yet).

andrepxx avatar Apr 11 '18 07:04 andrepxx

Thank you andrepxx to be so cool! I will search for how to use jQuery in angular while watching pure-knob

DaoFof avatar Apr 11 '18 09:04 DaoFof