대시보드 화면 감지 기능 추가
This commit is contained in:
@@ -57,11 +57,27 @@ export function detectScreenResolution(): Resolution {
|
||||
const width = window.screen.width;
|
||||
const height = window.screen.height;
|
||||
|
||||
let detectedResolution: Resolution;
|
||||
|
||||
// 화면 해상도에 따라 적절한 캔버스 해상도 반환
|
||||
if (width >= 3840 || height >= 2160) return "uhd";
|
||||
if (width >= 2560 || height >= 1440) return "qhd";
|
||||
if (width >= 1920 || height >= 1080) return "fhd";
|
||||
return "hd";
|
||||
if (width >= 3840 || height >= 2160) {
|
||||
detectedResolution = "uhd";
|
||||
} else if (width >= 2560 || height >= 1440) {
|
||||
detectedResolution = "qhd";
|
||||
} else if (width >= 1920 || height >= 1080) {
|
||||
detectedResolution = "fhd";
|
||||
} else {
|
||||
detectedResolution = "hd";
|
||||
}
|
||||
|
||||
console.log("🖥️ 화면 해상도 자동 감지:", {
|
||||
screenWidth: width,
|
||||
screenHeight: height,
|
||||
detectedResolution,
|
||||
canvasSize: RESOLUTIONS[detectedResolution],
|
||||
});
|
||||
|
||||
return detectedResolution;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user