feat: Make BBox Handles adapt to Aspect Ratio lock

This commit is contained in:
blessedcoolant
2023-07-10 20:37:00 +12:00
parent 15175bb998
commit 0bfa5ffd8e
5 changed files with 30 additions and 15 deletions

View File

@ -42,7 +42,7 @@ const ParamBoundingBoxWidth = () => {
})
);
if (aspectRatio) {
const newWidth = roundToMultiple(v * aspectRatio, 8);
const newWidth = roundToMultiple(v * aspectRatio, 64);
dispatch(
setBoundingBoxDimensions({
width: newWidth,
@ -60,7 +60,7 @@ const ParamBoundingBoxWidth = () => {
})
);
if (aspectRatio) {
const newWidth = roundToMultiple(512 * aspectRatio, 8);
const newWidth = roundToMultiple(512 * aspectRatio, 64);
dispatch(
setBoundingBoxDimensions({
width: newWidth,

View File

@ -42,7 +42,7 @@ const ParamBoundingBoxWidth = () => {
})
);
if (aspectRatio) {
const newHeight = roundToMultiple(v / aspectRatio, 8);
const newHeight = roundToMultiple(v / aspectRatio, 64);
dispatch(
setBoundingBoxDimensions({
width: Math.floor(v),
@ -60,7 +60,7 @@ const ParamBoundingBoxWidth = () => {
})
);
if (aspectRatio) {
const newHeight = roundToMultiple(512 / aspectRatio, 8);
const newHeight = roundToMultiple(512 / aspectRatio, 64);
dispatch(
setBoundingBoxDimensions({
width: Math.floor(512),