"git@developer.sourcefind.cn:chenpangpang/ComfyUI.git" did not exist on "45a3df1cdef490b5910f139d14d42e19463ea2d8"
Commit e6e1999f authored by malern's avatar malern
Browse files

Render UI at a higher resolution when viewing with a higher pixel ratio

parent 2998e232
...@@ -921,8 +921,9 @@ export class ComfyApp { ...@@ -921,8 +921,9 @@ export class ComfyApp {
this.graph.start(); this.graph.start();
function resizeCanvas() { function resizeCanvas() {
canvasEl.width = canvasEl.offsetWidth; canvasEl.width = canvasEl.offsetWidth * window.devicePixelRatio;
canvasEl.height = canvasEl.offsetHeight; canvasEl.height = canvasEl.offsetHeight * window.devicePixelRatio;
canvasEl.getContext("2d").scale(window.devicePixelRatio, window.devicePixelRatio);
canvas.draw(true, true); canvas.draw(true, true);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment