mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-06 13:40:25 +00:00
Fix blurry links on HiDPI screen (#116)
This commit is contained in:
@@ -8739,7 +8739,8 @@ const globalExport = {};
|
||||
if (this.bgcanvas == this.canvas) {
|
||||
this.drawBackCanvas();
|
||||
} else {
|
||||
ctx.drawImage(this.bgcanvas, 0, 0);
|
||||
let scale = window.devicePixelRatio;
|
||||
ctx.drawImage(this.bgcanvas, 0, 0, this.bgcanvas.width / scale, this.bgcanvas.height / scale);
|
||||
}
|
||||
|
||||
//rendering
|
||||
@@ -9245,8 +9246,9 @@ const globalExport = {};
|
||||
|
||||
//reset in case of error
|
||||
if (!this.viewport) {
|
||||
let scale = window.devicePixelRatio;
|
||||
ctx.restore();
|
||||
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
||||
ctx.setTransform(scale, 0, 0, scale, 0, 0);
|
||||
}
|
||||
this.visible_links.length = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user