Skip to content

Commit 381cd4f

Browse files
committed
fix(potetiometer): visual glitch #133
1 parent 86a4357 commit 381cd4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/potentiometer-element.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ interface Point {
1313
functions are taken from https://github.com/vitaliy-bobrov/js-rocks knob component */
1414
@customElement('wokwi-potentiometer')
1515
export class PotentiometerElement extends LitElement {
16-
@property() min = 0;
17-
@property() max = 100;
16+
@property({ type: Number }) min = 0;
17+
@property({ type: Number }) max = 100;
1818
@property() value = 0;
1919
@property() step = 1;
2020
@property() startDegree = -135;
@@ -209,7 +209,7 @@ export class PotentiometerElement extends LitElement {
209209
const y = this.center.y - pageY;
210210
let deg = Math.round((Math.atan2(y, x) * 180) / Math.PI);
211211

212-
if (deg < 0) {
212+
if (deg <= 0) {
213213
deg += 360;
214214
}
215215

0 commit comments

Comments
 (0)