balibabu
commited on
Commit
·
b8663aa
1
Parent(s):
23aa27e
Fix: The right coordinates of Categorize and Switch operators are misplaced #3868 (#3869)
Browse files### What problem does this PR solve?
Fix: The right coordinates of Categorize and Switch operators are
misplaced #3868
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
web/src/components/editable-cell.tsx
CHANGED
@@ -90,11 +90,7 @@ export const EditableCell: React.FC<EditableCellProps> = ({
|
|
90 |
<Input ref={inputRef} onPressEnter={save} onBlur={save} />
|
91 |
</Form.Item>
|
92 |
) : (
|
93 |
-
<div
|
94 |
-
className="editable-cell-value-wrap"
|
95 |
-
// style={{ paddingRight: 24 }}
|
96 |
-
onClick={toggleEdit}
|
97 |
-
>
|
98 |
<Text>{children}</Text>
|
99 |
</div>
|
100 |
);
|
|
|
90 |
<Input ref={inputRef} onPressEnter={save} onBlur={save} />
|
91 |
</Form.Item>
|
92 |
) : (
|
93 |
+
<div onClick={toggleEdit} className="truncate">
|
|
|
|
|
|
|
|
|
94 |
<Text>{children}</Text>
|
95 |
</div>
|
96 |
);
|
web/src/pages/flow/canvas/node/hooks.ts
CHANGED
@@ -35,7 +35,7 @@ export const useBuildCategorizeHandlePositions = ({
|
|
35 |
list.push({
|
36 |
text: x,
|
37 |
idx,
|
38 |
-
top: idx === 0 ? 98 : list[idx - 1].top + 8 + 26,
|
39 |
});
|
40 |
});
|
41 |
|
@@ -71,7 +71,7 @@ export const useBuildSwitchHandlePositions = ({
|
|
71 |
}> = [];
|
72 |
|
73 |
[...conditions, ''].forEach((x, idx) => {
|
74 |
-
let top = idx === 0 ? 58 : list[idx - 1].top + 32; // case number (Case 1) height + flex gap
|
75 |
if (idx - 1 >= 0) {
|
76 |
const previousItems = conditions[idx - 1]?.items ?? [];
|
77 |
if (previousItems.length > 0) {
|
|
|
35 |
list.push({
|
36 |
text: x,
|
37 |
idx,
|
38 |
+
top: idx === 0 ? 98 + 20 : list[idx - 1].top + 8 + 26,
|
39 |
});
|
40 |
});
|
41 |
|
|
|
71 |
}> = [];
|
72 |
|
73 |
[...conditions, ''].forEach((x, idx) => {
|
74 |
+
let top = idx === 0 ? 58 + 20 : list[idx - 1].top + 32; // case number (Case 1) height + flex gap
|
75 |
if (idx - 1 >= 0) {
|
76 |
const previousItems = conditions[idx - 1]?.items ?? [];
|
77 |
if (previousItems.length > 0) {
|
web/src/pages/flow/canvas/node/relevant-node.tsx
CHANGED
@@ -33,7 +33,7 @@ export function RelevantNode({ id, data, selected }: NodeProps<NodeData>) {
|
|
33 |
isConnectable
|
34 |
className={styles.handle}
|
35 |
id={'yes'}
|
36 |
-
style={{ ...RightHandleStyle, top:
|
37 |
></Handle>
|
38 |
<Handle
|
39 |
type="source"
|
@@ -41,7 +41,7 @@ export function RelevantNode({ id, data, selected }: NodeProps<NodeData>) {
|
|
41 |
isConnectable
|
42 |
className={styles.handle}
|
43 |
id={'no'}
|
44 |
-
style={{ ...RightHandleStyle, top:
|
45 |
></Handle>
|
46 |
<NodeHeader
|
47 |
id={id}
|
|
|
33 |
isConnectable
|
34 |
className={styles.handle}
|
35 |
id={'yes'}
|
36 |
+
style={{ ...RightHandleStyle, top: 57 + 20 }}
|
37 |
></Handle>
|
38 |
<Handle
|
39 |
type="source"
|
|
|
41 |
isConnectable
|
42 |
className={styles.handle}
|
43 |
id={'no'}
|
44 |
+
style={{ ...RightHandleStyle, top: 115 + 20 }}
|
45 |
></Handle>
|
46 |
<NodeHeader
|
47 |
id={id}
|