diff --git a/webapp/src/components/DAGSvgs/constants.ts b/webapp/src/components/DAGSvgs/constants.ts index 08f5d0f..b80dec1 100644 --- a/webapp/src/components/DAGSvgs/constants.ts +++ b/webapp/src/components/DAGSvgs/constants.ts @@ -2,8 +2,8 @@ import { DAGBoardElmDims } from 'components/DAGSvgs/DAGBoard'; -export const NODE_WIDTH = 100 as const; -export const NODE_HEIGHT = 40 as const; +export const NODE_WIDTH = 150 as const; +export const NODE_HEIGHT = 60 as const; export const ADD_HEIGHT = 10 as const; export const ADD_WIDTH = 10 as const; export const CIRCLE_SIZE = 30 as const; diff --git a/webapp/src/components/DAGSvgs/styles.ts b/webapp/src/components/DAGSvgs/styles.ts index 79e2fcb..68b41c1 100644 --- a/webapp/src/components/DAGSvgs/styles.ts +++ b/webapp/src/components/DAGSvgs/styles.ts @@ -18,7 +18,7 @@ export const useBoardStyles = createAppUseStyles<{ height: '100%', overflow: 'scroll' }, - svg: ({boardHeight, boardWidth}) => ({ + svg: ({ boardHeight, boardWidth }) => ({ minHeight: `${boardHeight}px`, minWidth: `${boardWidth}px`, padding: 0, @@ -112,7 +112,7 @@ export const useNodeStyles = createAppUseStyles<{ text: { textOverflow: 'ellipsis', overflow: "hidden", - whiteSpace: "nowrap", + whiteSpace: "break-spaces", cursor: 'default', }, buttonDelete: { @@ -142,16 +142,16 @@ export const useNodeStyles = createAppUseStyles<{ } }) -export const useCircleStyles = createAppUseStyles<{ +export const useCircleStyles = createAppUseStyles<{ size: number, hasOnFunction: boolean, hasRemoveFunction: boolean, backgroundColor?: string, - }>(theme => ({ - root: ({ size, hasOnFunction, hasRemoveFunction, backgroundColor }) => { - const baseColor = backgroundColor ? backgroundColor : Color(theme.primary).set('rgb.g', 100).hex(); - const hoverColor = (hasOnFunction && !hasRemoveFunction) ? Color(theme.primary).set('rgb.g', 150).hex() : baseColor - return { +}>(theme => ({ + root: ({ size, hasOnFunction, hasRemoveFunction, backgroundColor }) => { + const baseColor = backgroundColor ? backgroundColor : Color(theme.primary).set('rgb.g', 100).hex(); + const hoverColor = (hasOnFunction && !hasRemoveFunction) ? Color(theme.primary).set('rgb.g', 150).hex() : baseColor + return { backgroundColor: baseColor, borderRadius: hasRemoveFunction ? 10 : 500, height: size,