scrollbar: fix drawing issue
This commit is contained in:
parent
3730aa7199
commit
8bec0552d4
1 changed files with 2 additions and 1 deletions
|
|
@ -232,7 +232,8 @@ export default class Scrollbar extends StaticProperties(Fader, {
|
|||
this.ctx.fillStyle = this.cssVars.colorKnob
|
||||
|
||||
this.ctx.beginPath()
|
||||
d = d / (height - this.gaugePadding) * (height-this.gaugePadding - knobHeight)
|
||||
// adjust position to keep knob within gauge boundaries
|
||||
d = (d - this.gaugePadding ) / (height - this.gaugePadding * 2 ) * (height - this.gaugePadding * 2 - knobHeight) + this.gaugePadding
|
||||
if (this.cssVars.borderRadius > 0 && this.ctx.roundRect) {
|
||||
this.ctx.roundRect(this.gaugePadding, d, width - this.gaugePadding * 2, knobHeight, PXSCALE * this.cssVars.borderRadius)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue