Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Commit

Permalink
Fix #477, use devicePixelRatio to get retina pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
ianb committed Oct 23, 2019
1 parent 8ee28bf commit dbd9bd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extension/intents/search/queryScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ this.queryScript = (function() {
"http://www.w3.org/1999/xhtml",
"canvas"
);
canvas.width = rect.width; // * window.devicePixelRatio
canvas.height = rect.height; // * window.devicePixelRatio
canvas.width = rect.width * window.devicePixelRatio;
canvas.height = rect.height * window.devicePixelRatio;
const ctx = canvas.getContext("2d");
// ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
ctx.drawWindow(window, rect.x, rect.y, rect.width, rect.height, "#fff");
return {
width: rect.width,
Expand Down

0 comments on commit dbd9bd3

Please sign in to comment.