mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
fix textStrokeWidth=0
This commit is contained in:
parent
7c57338d2b
commit
4482b33356
@ -235,7 +235,12 @@ export class CanvasRenderer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (styles.textStrokeWidth && styles.textStrokeColor && text.text.trim().length) {
|
if (
|
||||||
|
styles.textStrokeWidth &&
|
||||||
|
styles.textStrokeWidth.number &&
|
||||||
|
styles.textStrokeColor &&
|
||||||
|
text.text.trim().length
|
||||||
|
) {
|
||||||
this.ctx.strokeStyle = asString(styles.textStrokeColor);
|
this.ctx.strokeStyle = asString(styles.textStrokeColor);
|
||||||
this.ctx.lineWidth = getAbsoluteValue(styles.textStrokeWidth, text.bounds.width);
|
this.ctx.lineWidth = getAbsoluteValue(styles.textStrokeWidth, text.bounds.width);
|
||||||
this.ctx.strokeText(text.text, text.bounds.left, text.bounds.top + text.bounds.height);
|
this.ctx.strokeText(text.text, text.bounds.left, text.bounds.top + text.bounds.height);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user