We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86a4357 commit 381cd4fCopy full SHA for 381cd4f
src/potentiometer-element.ts
@@ -13,8 +13,8 @@ interface Point {
13
functions are taken from https://github.com/vitaliy-bobrov/js-rocks knob component */
14
@customElement('wokwi-potentiometer')
15
export class PotentiometerElement extends LitElement {
16
- @property() min = 0;
17
- @property() max = 100;
+ @property({ type: Number }) min = 0;
+ @property({ type: Number }) max = 100;
18
@property() value = 0;
19
@property() step = 1;
20
@property() startDegree = -135;
@@ -209,7 +209,7 @@ export class PotentiometerElement extends LitElement {
209
const y = this.center.y - pageY;
210
let deg = Math.round((Math.atan2(y, x) * 180) / Math.PI);
211
212
- if (deg < 0) {
+ if (deg <= 0) {
213
deg += 360;
214
}
215
0 commit comments