fix: don't apply text shadows on elements (#1795)

* Fix for Issue-1638 (https://github.com/niklasvh/html2canvas/issues/1638)
Resolution: Clearing the Shadow Properties after they are consumed
This commit is contained in:
MoyuScript
2019-04-07 21:36:14 -07:00
parent 333880187f
commit 3053783b76
2 changed files with 17 additions and 0 deletions

View File

@@ -235,6 +235,11 @@ export default class CanvasRenderer implements RenderTarget<HTMLCanvasElement> {
text.bounds.top + text.bounds.height
);
});
this.ctx.shadowColor = '';
this.ctx.shadowOffsetX = 0;
this.ctx.shadowOffsetY = 0;
this.ctx.shadowBlur = 0;
} else {
this.ctx.fillText(
text.text,