1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-07-11 17:16:26 +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

10
.gitignore vendored
View File

@ -1,3 +1,11 @@
.sass-cache
### OSX ###
.DS_Store
### PhPStorm / IntellJ IDEA ###
.idea/
*.iml
### Dependencies ###
node_modules/
*.map
.sass-cache

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,