mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-22 07:36:59 +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() {
|
function resizeCanvas() {
|
||||||
// Limit minimal scale to 1, see https://github.com/comfyanonymous/ComfyUI/pull/845
|
// Limit minimal scale to 1, see https://github.com/comfyanonymous/ComfyUI/pull/845
|
||||||
const scale = Math.max(window.devicePixelRatio, 1);
|
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();
|
const { width, height } = canvasEl.getBoundingClientRect();
|
||||||
canvasEl.width = Math.round(width * scale);
|
canvasEl.width = Math.round(width * scale);
|
||||||
canvasEl.height = Math.round(height * scale);
|
canvasEl.height = Math.round(height * scale);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user