Skip to content

Commit

Permalink
fix(ui): prevent panel size percentages over 100
Browse files Browse the repository at this point in the history
  • Loading branch information
psychedelicious committed Sep 25, 2024
1 parent 8b9b64d commit 9c0d357
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion invokeai/frontend/web/src/features/ui/hooks/usePanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,5 @@ const getSizeAsPercentage = (
});

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

0 comments on commit 9c0d357

Please # to comment.