Skip to content

Commit

Permalink
update circles
Browse files Browse the repository at this point in the history
  • Loading branch information
takyyon committed Jan 23, 2025
1 parent e2a01dd commit 581987e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
20 changes: 10 additions & 10 deletions libs/data-mapper-v2/src/components/canvas/useReactflowStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,6 @@ const useReactFlowStates = (props: ReactFlowStatesProps) => {
y: 0,
};

const commonProps = {
draggable: false,
selectable: false,
deletable: false,
dragging: false,
selected: false,
};

const newTargetNodePosition = {
x: newWidth - panelWidthWithoutHandles,
y: 0,
Expand Down Expand Up @@ -231,7 +223,11 @@ const useReactFlowStates = (props: ReactFlowStatesProps) => {
id: NodeIds.source,
type: 'schemaPanel',
data: {},
...commonProps,
draggable: false,
selectable: false,
deletable: false,
dragging: false,
selected: false,
position: newSourceNodePosition,
...dimensions,
},
Expand All @@ -258,7 +254,11 @@ const useReactFlowStates = (props: ReactFlowStatesProps) => {
item: {
id: NodeIds.target,
type: 'schemaPanel',
...commonProps,
draggable: false,
selectable: false,
deletable: false,
dragging: false,
selected: false,
data: {},
position: newTargetNodePosition,
...dimensions,
Expand Down
4 changes: 2 additions & 2 deletions libs/data-mapper-v2/src/components/schema/tree/SchemaTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const SchemaTree = (props: SchemaTreeProps) => {
position={Position.Left}
type="target"
className={handleStyles.hidden}
style={{ top: '0px', left: '8px' }}
style={{ top: '0px', left: '18px' }}
/>
)}
{currentHeight !== undefined && nodesForScroll['bottom-right'] && (
Expand All @@ -165,7 +165,7 @@ export const SchemaTree = (props: SchemaTreeProps) => {
position={Position.Left}
type="target"
className={handleStyles.hidden}
style={{ top: `${currentHeight}px`, left: '8px' }}
style={{ top: `${currentHeight}px`, left: '18px' }}
/>
)}
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const SchemaTreeNode = (props: SchemaTreeNodeProps) => {

return (
<div
className={mergeClasses(styles.root, isSourceSchema ? '' : styles.targetSchemaRoot)}
className={styles.root}
ref={(ref) => {
if (ref) {
const newRect = ref.getBoundingClientRect();
Expand Down
10 changes: 3 additions & 7 deletions libs/data-mapper-v2/src/components/schema/tree/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export const useStyles = makeStyles({
marginLeft: '14px',
},
targetScehmaRoot: {
paddingLeft: '14px',
paddingRight: '14px',
marginRight: '14px',
},
root: {
height: '100%',
Expand Down Expand Up @@ -40,9 +39,6 @@ export const useTreeNodeStyles = makeStyles({
height: '100%',
width: '-webkit-fill-available',
},
targetSchemaRoot: {
paddingLeft: '7px',
},
container: {
width: '-webkit-fill-available',
height: '100%',
Expand All @@ -53,7 +49,7 @@ export const useTreeNodeStyles = makeStyles({
},
},
targetSchemaContainer: {
marginLeft: '16px',
marginLeft: '30px',
},
sourceSchemaContainer: {
marginRight: '16px',
Expand Down Expand Up @@ -124,6 +120,6 @@ export const useHandleStyles = makeStyles({
right: '16px',
},
right: {
left: '2px',
left: '16px',
},
});

0 comments on commit 581987e

Please sign in to comment.