Reformat code
This commit is contained in:
parent
9c2151f182
commit
2b54735175
13
service.js
13
service.js
@ -886,10 +886,11 @@ class BesService {
|
|||||||
* @param {Number} scale Sign scale
|
* @param {Number} scale Sign scale
|
||||||
* @param {Number} dpr Device pixel ratio
|
* @param {Number} dpr Device pixel ratio
|
||||||
*/
|
*/
|
||||||
setCtxFont(scale, dpr)
|
setCtxFont(scale, dpr) {
|
||||||
{
|
|
||||||
const styles = window.getComputedStyle(this.canvasPanel)
|
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.paddingRight) -
|
||||||
parseFloat(styles.borderRightWidth)
|
parseFloat(styles.borderRightWidth)
|
||||||
}px`
|
}px`
|
||||||
textElement.style.height = `${rect.height -
|
textElement.style.height = `${
|
||||||
|
rect.height -
|
||||||
parseFloat(styles.borderTopWidth) -
|
parseFloat(styles.borderTopWidth) -
|
||||||
parseFloat(styles.paddingTop) -
|
parseFloat(styles.paddingTop) -
|
||||||
parseFloat(styles.paddingBottom) -
|
parseFloat(styles.paddingBottom) -
|
||||||
parseFloat(styles.borderBottomWidth)}px`
|
parseFloat(styles.borderBottomWidth)
|
||||||
|
}px`
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user