Skip to content

Commit 9c0d357

Browse files
fix(ui): prevent panel size percentages over 100
1 parent 8b9b64d commit 9c0d357

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

invokeai/frontend/web/src/features/ui/hooks/usePanel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,5 +250,5 @@ const getSizeAsPercentage = (
250250
});
251251

252252
// The final value is a percentage of the available space
253-
return (sizeInPixels / availableSpace) * 100;
253+
return Math.min((sizeInPixels / availableSpace) * 100, 100);
254254
};

0 commit comments

Comments
 (0)