We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4862c7 commit bb3bebcCopy full SHA for bb3bebc
inst/www/opencpu-0.4.js
@@ -255,6 +255,7 @@
255
var Location;
256
var pngwidth;
257
var pngheight;
258
+ var ratio = window.devicePixelRatio || 1;
259
260
var plotdiv = $('<div />').attr({
261
style: "width: 100%; height:100%; min-width: 100px; min-height: 100px; position:relative; background-repeat:no-repeat; background-size: 100% 100%;"
@@ -283,7 +284,7 @@
283
284
if(!Location) return;
285
pngwidth = plotdiv.width();
286
pngheight = plotdiv.height();
- plotdiv.css("background-image", "url(" + Location + "graphics/last/png?width=" + pngwidth + "&height=" + pngheight + ")");
287
+ plotdiv.css("background-image", "url(" + Location + "graphics/last/png?width=" + pngwidth * ratio + "&height=" + pngheight * ratio + "&res=" + 72 * ratio + ")");
288
}
289
290
function setlocation(newloc){
0 commit comments