1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-13 10:06:23 +02:00

Merge pull request #219 from AshBardhan/retina-screenshot-fix

Retina screenshot Fix
This commit is contained in:
Kushagra Gour
2017-10-15 23:38:24 +05:30
committed by GitHub
2 changed files with 15 additions and 5 deletions

View File

@ -1569,12 +1569,14 @@ globalConsoleContainerEl
c.width = iframeBounds.width;
c.height = iframeBounds.height;
var ctx = c.getContext('2d');
var devicePixelRatio = window.devicePixelRatio || 1;
ctx.drawImage(
image,
iframeBounds.left,
iframeBounds.top,
iframeBounds.width,
iframeBounds.height,
iframeBounds.left * devicePixelRatio,
iframeBounds.top * devicePixelRatio,
iframeBounds.width * devicePixelRatio,
iframeBounds.height * devicePixelRatio,
0,
0,
iframeBounds.width,