chore: default tabs

This commit is contained in:
Nathan Walker
2020-07-09 23:46:02 -07:00
parent 8100cf7089
commit 41f0573d8e
353 changed files with 55344 additions and 55344 deletions

View File

@@ -1,23 +1,23 @@
export function getScaledDimensions(width: number, height: number, maxSize: number) {
if (height >= width) {
if (height <= maxSize) {
// if image already smaller than the required height
return { width, height };
}
if (height >= width) {
if (height <= maxSize) {
// if image already smaller than the required height
return { width, height };
}
return {
width: Math.round((maxSize * width) / height),
height: maxSize,
};
}
return {
width: Math.round((maxSize * width) / height),
height: maxSize,
};
}
if (width <= maxSize) {
// if image already smaller than the required width
return { width, height };
}
if (width <= maxSize) {
// if image already smaller than the required width
return { width, height };
}
return {
width: maxSize,
height: Math.round((maxSize * height) / width),
};
return {
width: maxSize,
height: Math.round((maxSize * height) / width),
};
}