Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: The right coordinates of Categorize and Switch operators are misplaced #3868 #3869

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix: The right coordinates of Categorize and Switch operators are mis…
…placed #3868
cike8899 committed Dec 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 9dde06ada1150a1891d2707d38690f8af5ddc356
6 changes: 1 addition & 5 deletions web/src/components/editable-cell.tsx
Original file line number Diff line number Diff line change
@@ -90,11 +90,7 @@ export const EditableCell: React.FC<EditableCellProps> = ({
<Input ref={inputRef} onPressEnter={save} onBlur={save} />
</Form.Item>
) : (
<div
className="editable-cell-value-wrap"
// style={{ paddingRight: 24 }}
onClick={toggleEdit}
>
<div onClick={toggleEdit} className="truncate">
<Text>{children}</Text>
</div>
);
4 changes: 2 additions & 2 deletions web/src/pages/flow/canvas/node/hooks.ts
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ export const useBuildCategorizeHandlePositions = ({
list.push({
text: x,
idx,
top: idx === 0 ? 98 : list[idx - 1].top + 8 + 26,
top: idx === 0 ? 98 + 20 : list[idx - 1].top + 8 + 26,
});
});

@@ -71,7 +71,7 @@ export const useBuildSwitchHandlePositions = ({
}> = [];

[...conditions, ''].forEach((x, idx) => {
let top = idx === 0 ? 58 : list[idx - 1].top + 32; // case number (Case 1) height + flex gap
let top = idx === 0 ? 58 + 20 : list[idx - 1].top + 32; // case number (Case 1) height + flex gap
if (idx - 1 >= 0) {
const previousItems = conditions[idx - 1]?.items ?? [];
if (previousItems.length > 0) {
4 changes: 2 additions & 2 deletions web/src/pages/flow/canvas/node/relevant-node.tsx
Original file line number Diff line number Diff line change
@@ -33,15 +33,15 @@ export function RelevantNode({ id, data, selected }: NodeProps<NodeData>) {
isConnectable
className={styles.handle}
id={'yes'}
style={{ ...RightHandleStyle, top: 59 }}
style={{ ...RightHandleStyle, top: 57 + 20 }}
></Handle>
<Handle
type="source"
position={Position.Right}
isConnectable
className={styles.handle}
id={'no'}
style={{ ...RightHandleStyle, top: 112 }}
style={{ ...RightHandleStyle, top: 115 + 20 }}
></Handle>
<NodeHeader
id={id}