Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
f8bedc12
authored
Dec 30, 2025
by
heheer
Committed by
GitHub
Dec 30, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: workflow fixview padding & context menu position (#6169)
parent
f626c961
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
24 deletions
+13
-24
packages/web/components/common/Icon/constants.ts
+1
-1
packages/web/components/common/Icon/icons/core/modules/fitView.svg
+0
-0
projects/app/src/pageComponents/app/detail/Workflow/components/SearchButton.tsx
+1
-1
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/components/ContextMenu.tsx
+5
-6
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/components/FlowController.tsx
+2
-2
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/hooks/useWorkflow.tsx
+1
-1
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/index.tsx
+1
-0
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/NodeCard.tsx
+1
-2
projects/app/src/pageComponents/app/detail/WorkflowComponents/context/workflowUtilsContext.tsx
+1
-11
No files found.
packages/web/components/common/Icon/constants.ts
View file @
f8bedc12
...
...
@@ -262,7 +262,7 @@ export const iconPaths = {
'core/dataset/yuqueDatasetColor'
:
()
=>
import
(
'./icons/core/dataset/yuqueDatasetColor.svg'
),
'core/dataset/yuqueDatasetOutline'
:
()
=>
import
(
'./icons/core/dataset/yuqueDatasetOutline.svg'
),
'core/modules/basicNode'
:
()
=>
import
(
'./icons/core/modules/basicNode.svg'
),
'core/modules/fi
xview'
:
()
=>
import
(
'./icons/core/modules/fixv
iew.svg'
),
'core/modules/fi
tView'
:
()
=>
import
(
'./icons/core/modules/fitV
iew.svg'
),
'core/modules/flowLight'
:
()
=>
import
(
'./icons/core/modules/flowLight.svg'
),
'core/modules/previewLight'
:
()
=>
import
(
'./icons/core/modules/previewLight.svg'
),
'core/modules/systemPlugin'
:
()
=>
import
(
'./icons/core/modules/systemPlugin.svg'
),
...
...
packages/web/components/common/Icon/icons/core/modules/fi
xv
iew.svg
→
packages/web/components/common/Icon/icons/core/modules/fi
tV
iew.svg
View file @
f8bedc12
File moved
projects/app/src/pageComponents/app/detail/Workflow/components/SearchButton.tsx
View file @
f8bedc12
...
...
@@ -64,7 +64,7 @@ const SearchButton = (props: ButtonProps) => {
const
searchedNode
=
searchResult
[
searchIndex
]
??
searchResult
[
0
];
if
(
searchedNode
)
{
fitView
({
nodes
:
[
searchedNode
],
padding
:
0.
4
});
fitView
({
nodes
:
[
searchedNode
],
padding
:
0.
6
});
}
return
nodes
.
map
((
node
)
=>
({
...
...
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/components/ContextMenu.tsx
View file @
f8bedc12
...
...
@@ -226,7 +226,7 @@ const ContextMenu = () => {
});
setTimeout
(()
=>
{
fitView
();
fitView
(
{
padding
:
0.3
}
);
});
},
[
fitView
,
getParentNodeSizeAndPosition
,
setEdges
,
setNodes
]);
...
...
@@ -302,9 +302,9 @@ const ContextMenu = () => {
);
return
(
<
Box
position=
"relative"
>
<
Box
>
<
Box
position=
"absolute"
position=
{
'fixed'
}
top=
{
`${menu.top - 6}px`
}
left=
{
`${menu.left + 10}px`
}
width=
{
0
}
...
...
@@ -312,18 +312,17 @@ const ContextMenu = () => {
borderLeft=
"6px solid transparent"
borderRight=
"6px solid transparent"
borderBottom=
"6px solid white"
zIndex=
{
2
}
zIndex=
{
10
}
filter=
"drop-shadow(0px -1px 2px rgba(0, 0, 0, 0.1))"
/>
<
Box
position=
{
'
absolute
'
}
position=
{
'
fixed
'
}
top=
{
menu
.
top
}
left=
{
menu
.
left
}
bg=
{
'white'
}
w=
{
'120px'
}
rounded=
{
'md'
}
boxShadow=
{
'0px 2px 4px 0px #A1A7B340'
}
className=
"context-menu"
color=
{
'myGray.600'
}
p=
{
1
}
zIndex=
{
10
}
...
...
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/components/FlowController.tsx
View file @
f8bedc12
...
...
@@ -197,11 +197,11 @@ const FlowController = React.memo(function FlowController() {
{
/* fit view */
}
<
MyTooltip
label=
{
t
(
'common:page_center'
)
}
>
<
ControlButton
onClick=
{
()
=>
fitView
()
}
onClick=
{
()
=>
fitView
(
{
padding
:
0.3
}
)
}
style=
{
buttonStyle
}
className=
{
`custom-workflow-fix_view ${styles.customControlButton}`
}
>
<
MyIcon
name=
{
'core/modules/fi
xv
iew'
}
/>
<
MyIcon
name=
{
'core/modules/fi
tV
iew'
}
/>
</
ControlButton
>
</
MyTooltip
>
</
Panel
>
...
...
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/hooks/useWorkflow.tsx
View file @
f8bedc12
...
...
@@ -828,7 +828,7 @@ export const useWorkflow = () => {
e
.
preventDefault
();
setMenu
({
top
:
e
.
clientY
-
64
,
top
:
e
.
clientY
+
6
,
left
:
e
.
clientX
-
12
});
},
...
...
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/index.tsx
View file @
f8bedc12
...
...
@@ -135,6 +135,7 @@ const Workflow = () => {
<
ReactFlow
ref=
{
reactFlowWrapperCallback
}
fitView
fitViewOptions=
{
{
padding
:
0.3
}
}
nodes=
{
nodes
}
edges=
{
edges
}
minZoom=
{
minZoom
}
...
...
projects/app/src/pageComponents/app/detail/WorkflowComponents/Flow/nodes/render/NodeCard.tsx
View file @
f8bedc12
...
...
@@ -135,8 +135,7 @@ const NodeCard = (props: Props) => {
setTimeout
(()
=>
{
fitView
({
nodes
:
[{
id
:
nodeId
}],
padding
:
0.3
,
duration
:
300
padding
:
0.3
});
},
100
);
},
[
onChangeNode
,
setPresentationMode
,
fitView
,
nodeId
]);
...
...
projects/app/src/pageComponents/app/detail/WorkflowComponents/context/workflowUtilsContext.tsx
View file @
f8bedc12
...
...
@@ -196,19 +196,9 @@ export const WorkflowUtilsProvider = ({ children }: { children: ReactNode }) =>
// View move to the node that failed
fitView
({
nodes
:
nodes
.
filter
((
node
)
=>
checkResults
.
includes
(
node
.
data
.
nodeId
)),
padding
:
0.3
,
duration
:
300
padding
:
0.3
});
setTimeout
(()
=>
{
const
viewport
=
getViewport
();
setViewport
({
x
:
viewport
.
x
,
y
:
viewport
.
y
+
36
,
zoom
:
viewport
.
zoom
});
},
300
);
toast
({
status
:
'warning'
,
title
:
t
(
'common:core.workflow.Check Failed'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment