diff --git a/service.js b/service.js index 83e68b6..2858163 100644 --- a/service.js +++ b/service.js @@ -692,7 +692,9 @@ class BesService { const x2 = rect.right const y = rect.bottom const scale = (rect.bottom - rect.top) / 18 - this.drawAttentionRequired(x1, x2, y, amplitude, scale) + if (ruleId !== 'MORFOLOGIK_RULE') { + this.drawDoubleUnderline(x1, x2, y, scale) + } else this.drawAttentionRequired(x1, x2, y, amplitude, scale) } markerY1 = Math.min(...match.highlights.map(rect => rect.top)) @@ -892,6 +894,23 @@ class BesService { this.ctx.stroke() } + /** + * + * @param {Number} x1 Sign left [px] + * @param {Number} x2 Sign right [px] + * @param {Number} y Sign baseline [px] + * @param {Number} scale Sign scale + */ + drawDoubleUnderline(x1, x2, y, scale) { + const dpr = window.devicePixelRatio + this.ctx.beginPath() + this.ctx.moveTo(x1 * dpr, (y - 2 * scale) * dpr) + this.ctx.lineTo(x2 * dpr, (y - 2 * scale) * dpr) + this.ctx.moveTo(x1 * dpr, (y + 1 * scale) * dpr) + this.ctx.lineTo(x2 * dpr, (y + 1 * scale) * dpr) + this.ctx.stroke() + } + /** * Sets markup font *