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:
Niklas von Hertzen
2019-04-07 21:36:14 -07:00
committed by GitHub
parent 7027900f49
commit 397595afb5
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,