xy: avoid border/point overlap

This commit is contained in:
bordun 2020-09-07 08:07:10 +02:00
parent fcd62b4bbf
commit 5de6671113
2 changed files with 5 additions and 5 deletions

View file

@ -22,7 +22,7 @@ class Pad extends Canvas {
super.cacheCanvasStyle(style)
this.pointSize = parseFloat(style.getPropertyValue('--pointSize')) * PXSCALE
this.padPadding = (this.cssVars.padding + this.cssVars.strokeWidth)
this.padPadding = (this.cssVars.padding + this.cssVars.strokeWidth) + 2 * PXSCALE
}

View file

@ -229,8 +229,8 @@ module.exports = class Xy extends Pad {
}
if (pip == 0 || pip == 100) continue
this.ctx.moveTo(px, margin)
this.ctx.lineTo(px, this.height - margin)
this.ctx.moveTo(px, margin - PXSCALE)
this.ctx.lineTo(px, this.height - margin + PXSCALE)
pipsDrawn = true
@ -250,8 +250,8 @@ module.exports = class Xy extends Pad {
}
if (pip == 0 || pip == 100) continue
this.ctx.moveTo(margin, py)
this.ctx.lineTo(this.width - margin, py)
this.ctx.moveTo(margin - PXSCALE, py)
this.ctx.lineTo(this.width - margin + PXSCALE, py)
pipsDrawn = true