mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): Set Min Width for Nodes
This commit is contained in:
parent
f258aba6d1
commit
b73fd2a6d2
@ -60,3 +60,5 @@ export const IN_PROGRESS_IMAGE_TYPES: Array<{
|
|||||||
{ key: 'Fast', value: 'latents' },
|
{ key: 'Fast', value: 'latents' },
|
||||||
{ key: 'Accurate', value: 'full-res' },
|
{ key: 'Accurate', value: 'full-res' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const NODE_MIN_WIDTH = 250;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { NODE_MIN_WIDTH } from 'app/constants';
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import { NodeResizeControl, NodeResizerProps } from 'reactflow';
|
import { NodeResizeControl, NodeResizerProps } from 'reactflow';
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ const IAINodeResizer = (props: NodeResizerProps) => {
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
}}
|
}}
|
||||||
minWidth={350}
|
minWidth={NODE_MIN_WIDTH}
|
||||||
{...rest}
|
{...rest}
|
||||||
></NodeResizeControl>
|
></NodeResizeControl>
|
||||||
);
|
);
|
||||||
|
@ -12,6 +12,7 @@ import { RootState } from 'app/store';
|
|||||||
import { AnyInvocationType } from 'services/events/types';
|
import { AnyInvocationType } from 'services/events/types';
|
||||||
import { createSelector } from '@reduxjs/toolkit';
|
import { createSelector } from '@reduxjs/toolkit';
|
||||||
import { useAppSelector } from 'app/storeHooks';
|
import { useAppSelector } from 'app/storeHooks';
|
||||||
|
import { NODE_MIN_WIDTH } from 'app/constants';
|
||||||
|
|
||||||
type InvocationComponentWrapperProps = PropsWithChildren & {
|
type InvocationComponentWrapperProps = PropsWithChildren & {
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
@ -28,6 +29,7 @@ const InvocationComponentWrapper = (props: InvocationComponentWrapperProps) => {
|
|||||||
sx={{
|
sx={{
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
borderRadius: 'md',
|
borderRadius: 'md',
|
||||||
|
minWidth: NODE_MIN_WIDTH,
|
||||||
boxShadow: props.selected
|
boxShadow: props.selected
|
||||||
? `${nodeSelectedOutline}, ${nodeShadow}`
|
? `${nodeSelectedOutline}, ${nodeShadow}`
|
||||||
: `${nodeShadow}`,
|
: `${nodeShadow}`,
|
||||||
|
Loading…
Reference in New Issue
Block a user