From 4a6b1bb03e2aa10032a98757bbd443669efd821a Mon Sep 17 00:00:00 2001 From: cesar Date: Wed, 4 Sep 2024 19:21:30 +0800 Subject: [PATCH] Fix blurry links on HiDPI screens --- src/litegraph.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/litegraph.js b/src/litegraph.js index 359f6e1d0..68ae324a3 100755 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -7889,7 +7889,7 @@ LGraphNode.prototype.executeAction = function(action) if (this.bgcanvas == this.canvas) { this.drawBackCanvas(); } else { - ctx.drawImage( this.bgcanvas, 0, 0 ); + ctx.drawImage( this.bgcanvas, 0, 0, this.bgcanvas.width / window.devicePixelRatio, this.bgcanvas.height / window.devicePixelRatio ); } //rendering @@ -8407,7 +8407,7 @@ LGraphNode.prototype.executeAction = function(action) if ( !this.viewport ) { ctx.restore(); - ctx.setTransform(1, 0, 0, 1, 0, 0); + ctx.setTransform(window.devicePixelRatio, 0, 0, window.devicePixelRatio, 0, 0); } this.visible_links.length = 0;