mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-20 22:17:02 +08:00
Fix menu disappearing on chrome
This commit is contained in:
parent
0406679f18
commit
45f59d28c1
@ -1500,6 +1500,9 @@ export class ComfyApp {
|
||||
function resizeCanvas() {
|
||||
// Limit minimal scale to 1, see https://github.com/comfyanonymous/ComfyUI/pull/845
|
||||
const scale = Math.max(window.devicePixelRatio, 1);
|
||||
|
||||
// Clear fixed width and height while calculating rect so it uses 100% instead
|
||||
canvasEl.height = canvasEl.width = "";
|
||||
const { width, height } = canvasEl.getBoundingClientRect();
|
||||
canvasEl.width = Math.round(width * scale);
|
||||
canvasEl.height = Math.round(height * scale);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user