feat: add support for 16:10 aspect ratio

This commit is contained in:
Idris Gadi
2026-01-27 15:59:01 +05:30
parent afbd0740a3
commit 0d27f4fc36
2 changed files with 37 additions and 34 deletions
+5 -2
View File
@@ -1,4 +1,4 @@
export type AspectRatio = '16:9' | '9:16' | '1:1' | '4:3' | '4:5';
export type AspectRatio = '16:9' | '9:16' | '1:1' | '4:3' | '4:5' | '16:10' | '10:16';
export function getAspectRatioValue(aspectRatio: AspectRatio): number {
switch (aspectRatio) {
@@ -7,6 +7,9 @@ export function getAspectRatioValue(aspectRatio: AspectRatio): number {
case '1:1': return 1;
case '4:3': return 4 / 3;
case '4:5': return 4 / 5;
case '16:10': return 16 / 10;
case '10:16': return 10 / 16;
default: return 1;
}
}
@@ -28,4 +31,4 @@ export function getAspectRatioLabel(aspectRatio: AspectRatio): string {
export function formatAspectRatioForCSS(aspectRatio: AspectRatio): string {
return aspectRatio.replace(':', '/');
}
}