mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-12 07:10:52 +08:00
Render UI at a higher resolution when viewing with a higher pixel ratio
This commit is contained in:
parent
85cac6c46d
commit
f0cd736047
@ -921,8 +921,9 @@ export class ComfyApp {
|
||||
this.graph.start();
|
||||
|
||||
function resizeCanvas() {
|
||||
canvasEl.width = canvasEl.offsetWidth;
|
||||
canvasEl.height = canvasEl.offsetHeight;
|
||||
canvasEl.width = canvasEl.offsetWidth * window.devicePixelRatio;
|
||||
canvasEl.height = canvasEl.offsetHeight * window.devicePixelRatio;
|
||||
canvasEl.getContext("2d").scale(window.devicePixelRatio, window.devicePixelRatio);
|
||||
canvas.draw(true, true);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user