spheras / knob Goto Github PK
View Code? Open in Web Editor NEWKnob is an Angular component to choose a value using a "knob like" rotation button
License: MIT License
Knob is an Angular component to choose a value using a "knob like" rotation button
License: MIT License
The component doesn't visually update when the value property is changed by an input property or via TS. In applications where the value can be changed from multiple places this is an issue.
Scenario - I'm wanting a knob where I can select every (whole) number between 0 and 720.
Problem - It doesn't seem to be possible to set values causing the step increments to be 1.
Reproduction - With a starting setup as follows...
[min]="0" [max]="720" [startDegree]="0" [endDegree]="360" (change)="log($event)"
I would have expected each "step" of the knob to be 2 (i.e. 720/360). However, in testing, this gives increase in output value of 6. Assuming this to be graphical precision due to the size of the knob, I expected that Increasing the [endDegree] to "720" (i.e. 2 full rotations), each "step" of the knob would now be 3. However, the step is still 6, the knob instead just moves twice as far (i.e. 2 degrees). This can be more clearly seen by setting [endDegree] to "3600" (i.e. 10 full rotations). The step is still 6 but the knob rotation occurs in very large jumps.
I'll have a work through the maths and submit a pull request if I figure anything out.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.