Skip to content

Commit 15285ec

Browse files
committed
Fix formatting issue in InpaintMaskMenuItemsExtractMaskedArea.tsx
1 parent 9351f5c commit 15285ec

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

invokeai/frontend/web/src/features/controlLayers/components/InpaintMask/InpaintMaskMenuItemsExtractMaskedArea.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@ export const InpaintMaskMenuItemsExtractMaskedArea = memo(() => {
6565
const maskCanvas = maskAdapter.getCanvas(rect);
6666
const maskImageData = canvasToImageData(maskCanvas);
6767

68-
if (
69-
maskImageData.width !== compositeImageData.width ||
70-
maskImageData.height !== compositeImageData.height
71-
) {
68+
if (maskImageData.width !== compositeImageData.width || maskImageData.height !== compositeImageData.height) {
7269
// Bail out if the mask and composite buffers disagree on dimensions.
7370
log.error(
7471
{
@@ -93,7 +90,7 @@ export const InpaintMaskMenuItemsExtractMaskedArea = memo(() => {
9390

9491
// Apply the mask alpha channel to each pixel in the composite, keeping RGB untouched and only masking alpha.
9592
for (let i = 0; i < compositeArray.length; i += 4) {
96-
const maskAlpha = ((maskArray[i + 3] ?? 0) / 255) || 0;
93+
const maskAlpha = (maskArray[i + 3] ?? 0) / 255 || 0;
9794
outputArray[i] = compositeArray[i] ?? 0;
9895
outputArray[i + 1] = compositeArray[i + 1] ?? 0;
9996
outputArray[i + 2] = compositeArray[i + 2] ?? 0;
@@ -153,4 +150,3 @@ export const InpaintMaskMenuItemsExtractMaskedArea = memo(() => {
153150
});
154151

155152
InpaintMaskMenuItemsExtractMaskedArea.displayName = 'InpaintMaskMenuItemsExtractMaskedArea';
156-

0 commit comments

Comments
 (0)