mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-13 10:26:38 +08:00
fix(frontend): WAF 规则编辑器缩小编排区高度和首次适配缩放比例,默认显示更多画布上下文
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
type Connection,
|
||||
type Edge,
|
||||
type EdgeChange,
|
||||
type FitViewOptions,
|
||||
type Node,
|
||||
type NodeChange,
|
||||
type ReactFlowInstance,
|
||||
@@ -43,6 +44,10 @@ import { NodeLibrary } from './node-library';
|
||||
import { RuleNode, type RuleFlowNodeData } from './rule-node';
|
||||
|
||||
const nodeTypes = { rule: RuleNode };
|
||||
const initialFitViewOptions = {
|
||||
padding: 0.3,
|
||||
maxZoom: 0.85,
|
||||
} satisfies FitViewOptions;
|
||||
|
||||
type FlowNode = Node<RuleFlowNodeData>;
|
||||
type FlowEdge = Edge;
|
||||
@@ -323,6 +328,7 @@ export function RuleFlowCanvas({
|
||||
onSelectEdge(undefined);
|
||||
}}
|
||||
fitView
|
||||
fitViewOptions={initialFitViewOptions}
|
||||
deleteKeyCode={['Backspace', 'Delete']}
|
||||
>
|
||||
<Background gap={20} size={1} />
|
||||
|
||||
Reference in New Issue
Block a user