From 2b54735175cf404d92b5f3e3c6ce4744096b4af6 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 4 Mar 2025 09:21:51 +0100 Subject: [PATCH] Reformat code --- service.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/service.js b/service.js index 1aebfc4..4073520 100644 --- a/service.js +++ b/service.js @@ -886,10 +886,11 @@ class BesService { * @param {Number} scale Sign scale * @param {Number} dpr Device pixel ratio */ - setCtxFont(scale, dpr) - { + setCtxFont(scale, dpr) { const styles = window.getComputedStyle(this.canvasPanel) - this.ctx.font = `${styles.fontStyle} ${styles.fontWeight} ${14 * scale * dpr}px ${styles.fontFamily}` + this.ctx.font = `${styles.fontStyle} ${styles.fontWeight} ${ + 14 * scale * dpr + }px ${styles.fontFamily}` } /** @@ -2473,11 +2474,13 @@ class BesTAService extends BesPlainTextService { parseFloat(styles.paddingRight) - parseFloat(styles.borderRightWidth) }px` - textElement.style.height = `${rect.height - + textElement.style.height = `${ + rect.height - parseFloat(styles.borderTopWidth) - parseFloat(styles.paddingTop) - parseFloat(styles.paddingBottom) - - parseFloat(styles.borderBottomWidth)}px` + parseFloat(styles.borderBottomWidth) + }px` } /**