Commit f90733fe authored by wuyongsheng's avatar wuyongsheng

fix: 锚点优化

parent 94e1a524
......@@ -397,7 +397,6 @@ const Flow = (props: IProps) => {
: setInSideBatchNodeId(id);
onBatchClick && onBatchClick(id);
setInSideFlowNodeId("");
document.getElementById(`point${id}`)?.scrollIntoView(true);
},
[onBatchClick, setSelectedBatchNodeId]
);
......@@ -406,12 +405,14 @@ const Flow = (props: IProps) => {
const onNodeClick = (e: any, node: Node) => {
tasks?.forEach((item) => {
if (item.id === node.id) {
if (item.type !== "BATCH") {
if (item.type === "BATCH") {
setNodeIdFun(node.id);
} else {
setInSideFlowNodeId(node.id);
setInSideBatchNodeId("");
setSelectedBatchNodeId && setSelectedBatchNodeId("");
}
setNodeIdFun(node.id);
document.getElementById(`point${node.id}`)?.scrollIntoView(true);
}
});
if (onFlowNodeClick) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment