multixy: prevent leaving empty elements to be consumed by canvas ctx.clearRect()
This commit is contained in:
parent
0178079fb8
commit
e466c66052
2 changed files with 3 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
- bug fixes
|
||||
- misc: sending typed arguments (`{type, value}` objects) should override the widget's `typeTags` definition
|
||||
- multixy: errors when `ephemeral` is `true`
|
||||
|
||||
- widgets
|
||||
- renamed `script` to `onValue`, `draw` to `onDraw`, `touch` to `onTouch`
|
||||
|
|
|
|||
|
|
@ -217,6 +217,7 @@ module.exports = class MultiXy extends Pad {
|
|||
|
||||
this.clear()
|
||||
|
||||
this.clearRect = []
|
||||
|
||||
for (var i=0;i<this.npoints;i++) {
|
||||
|
||||
|
|
@ -232,7 +233,7 @@ module.exports = class MultiXy extends Pad {
|
|||
this.ctx.globalAlpha = this.cssVars.alphaPips
|
||||
this.ctx.fillText(t, x + 0.5 * PXSCALE, y + PXSCALE)
|
||||
|
||||
this.clearRect[i] = [x - length / 2, y - this.fontSize / 2, length, this.fontSize + 2 * PXSCALE]
|
||||
this.clearRect.push([x - length / 2, y - this.fontSize / 2, length, this.fontSize + 2 * PXSCALE])
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue