Skip to content

Commit

Permalink
tidy(ui): remove save & copy functions for mask entities
Browse files Browse the repository at this point in the history
Not 100% sure that the format these are in is correct just yet. Will restore once we support importing image masks.
  • Loading branch information
psychedelicious committed Sep 18, 2024
1 parent e3f8482 commit 850f170
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { MenuDivider } from '@invoke-ai/ui-library';
import { CanvasEntityMenuItemsArrange } from 'features/controlLayers/components/common/CanvasEntityMenuItemsArrange';
import { CanvasEntityMenuItemsCopyToClipboard } from 'features/controlLayers/components/common/CanvasEntityMenuItemsCopyToClipboard';
import { CanvasEntityMenuItemsDelete } from 'features/controlLayers/components/common/CanvasEntityMenuItemsDelete';
import { CanvasEntityMenuItemsDuplicate } from 'features/controlLayers/components/common/CanvasEntityMenuItemsDuplicate';
import { CanvasEntityMenuItemsSave } from 'features/controlLayers/components/common/CanvasEntityMenuItemsSave';
import { CanvasEntityMenuItemsTransform } from 'features/controlLayers/components/common/CanvasEntityMenuItemsTransform';
import { memo } from 'react';

Expand All @@ -15,8 +13,6 @@ export const InpaintMaskMenuItems = memo(() => {
<CanvasEntityMenuItemsArrange />
<MenuDivider />
<CanvasEntityMenuItemsDuplicate />
<CanvasEntityMenuItemsCopyToClipboard />
<CanvasEntityMenuItemsSave />
<CanvasEntityMenuItemsDelete />
</>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { MenuDivider } from '@invoke-ai/ui-library';
import { CanvasEntityMenuItemsArrange } from 'features/controlLayers/components/common/CanvasEntityMenuItemsArrange';
import { CanvasEntityMenuItemsCopyToClipboard } from 'features/controlLayers/components/common/CanvasEntityMenuItemsCopyToClipboard';
import { CanvasEntityMenuItemsDelete } from 'features/controlLayers/components/common/CanvasEntityMenuItemsDelete';
import { CanvasEntityMenuItemsDuplicate } from 'features/controlLayers/components/common/CanvasEntityMenuItemsDuplicate';
import { CanvasEntityMenuItemsSave } from 'features/controlLayers/components/common/CanvasEntityMenuItemsSave';
import { CanvasEntityMenuItemsTransform } from 'features/controlLayers/components/common/CanvasEntityMenuItemsTransform';
import { RegionalGuidanceMenuItemsAddPromptsAndIPAdapter } from 'features/controlLayers/components/RegionalGuidance/RegionalGuidanceMenuItemsAddPromptsAndIPAdapter';
import { RegionalGuidanceMenuItemsAutoNegative } from 'features/controlLayers/components/RegionalGuidance/RegionalGuidanceMenuItemsAutoNegative';
Expand All @@ -20,8 +18,6 @@ export const RegionalGuidanceMenuItems = memo(() => {
<CanvasEntityMenuItemsArrange />
<MenuDivider />
<CanvasEntityMenuItemsDuplicate />
<CanvasEntityMenuItemsCopyToClipboard />
<CanvasEntityMenuItemsSave />
<CanvasEntityMenuItemsDelete />
</>
);
Expand Down
13 changes: 2 additions & 11 deletions invokeai/frontend/web/src/features/controlLayers/store/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,17 +385,8 @@ export function isTransformableEntityIdentifier(

export function isSaveableEntityIdentifier(
entityIdentifier: CanvasEntityIdentifier
): entityIdentifier is
| CanvasEntityIdentifier<'raster_layer'>
| CanvasEntityIdentifier<'control_layer'>
| CanvasEntityIdentifier<'inpaint_mask'>
| CanvasEntityIdentifier<'regional_guidance'> {
return (
isRasterLayerEntityIdentifier(entityIdentifier) ||
isControlLayerEntityIdentifier(entityIdentifier) ||
isInpaintMaskEntityIdentifier(entityIdentifier) ||
isRegionalGuidanceEntityIdentifier(entityIdentifier)
);
): entityIdentifier is CanvasEntityIdentifier<'raster_layer'> | CanvasEntityIdentifier<'control_layer'> {
return isRasterLayerEntityIdentifier(entityIdentifier) || isControlLayerEntityIdentifier(entityIdentifier);
}

export function isRenderableEntity(entity: CanvasEntityState): entity is CanvasRenderableEntityState {
Expand Down

0 comments on commit 850f170

Please sign in to comment.