knob: 360° pips fix
This commit is contained in:
parent
edd25d4cd6
commit
6d4126cd29
1 changed files with 2 additions and 2 deletions
|
|
@ -169,8 +169,8 @@ module.exports = class Knob extends _sliders_base {
|
|||
r2 = pipsRadius + pipsWidth / 2,
|
||||
a = 2 * Math.PI - this.percentToAngle(pip)
|
||||
|
||||
if (pip == 0) a += 1.5 * PXSCALE / pipsRadius
|
||||
if (pip == 100) a -= 1.5 * PXSCALE / pipsRadius
|
||||
if (pip == 0 && this.maxAngle != 360) a += 1.5 * PXSCALE / pipsRadius
|
||||
if (pip == 100 && this.maxAngle != 360) a -= 1.5 * PXSCALE / pipsRadius
|
||||
|
||||
this.ctx.moveTo(r1 * Math.cos(a) + this.width / 2, this.height / 2 - r1 * Math.sin(a))
|
||||
this.ctx.lineTo(r2 * Math.cos(a) + this.width / 2, this.height / 2 - r2 * Math.sin(a))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue