Skip to content

Commit

Permalink
🐛 fix: flowprops cant work (#102)
Browse files Browse the repository at this point in the history
Co-authored-by: jiangchu <jiangchu.wzy@antgroup.com>
  • Loading branch information
ModestFun and jiangchu authored May 30, 2024
1 parent 7194d19 commit ddc8300
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 47 deletions.
16 changes: 0 additions & 16 deletions src/FlowEditor/container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ const FlowEditor = forwardRef<any, FlowEditorProps>(
devtools,
onNodesInit,

// edge change
// beforeEdgesChange,
// onEdgesChange,
// afterEdgeChange,

// node change
// beforeNodesChange,
// onNodesChange,
// afterNodesChange,

// Connect
beforeConnect,
onConnect,
Expand All @@ -50,13 +40,7 @@ const FlowEditor = forwardRef<any, FlowEditorProps>(
miniMap={miniMap}
background={background}
onNodesInit={onNodesInit}
// beforeNodesChange={beforeNodesChange}
// beforeEdgesChange={beforeEdgesChange}
beforeConnect={beforeConnect}
// onEdgesChange={onEdgesChange}
// afterEdgeChange={afterEdgeChange}
// onNodesChange={onNodesChange}
// afterNodesChange={afterNodesChange}
onConnect={onConnect}
afterConnect={afterConnect}
contextMenuEnabled={contextMenuEnabled}
Expand Down
31 changes: 1 addition & 30 deletions src/FlowEditor/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,36 +73,7 @@ const ProFlowDemo = () => {

return (
<div className={styles.container}>
<FlowEditor
nodeTypes={nodeTypes}
// onNodesChange done
// beforeNodesChange={(nodes) => {
// console.log('beforeNodesChange', nodes);
// return true;
// }}
// onNodesChange={(nodes) => {
// console.log('onNodesChange', nodes);
// }}
// afterNodesChange={(nodes) => {
// console.log('afterNodesChange', nodes);
// }}
// onFlattenNodesChange={(e) => {
// console.log(e);
// }}

// onEdgesChange done
// beforeEdgesChange={(edges) => {
// console.log('beforeEdgesChange', edges);
// return true;
// }}

// afterEdgesChange={(edges) => {
// console.log('afterEdgesChange', edges);
// }}
// onFlattenEdgesChange={(e) => {
// console.log('flattenEdgesChange', e);
// }}
></FlowEditor>
<FlowEditor nodeTypes={nodeTypes}></FlowEditor>
</div>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/FlowView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ const FlowView: React.FC<Partial<FlowViewProps>> = (props) => {
return (
<>
<ReactFlow
{...flowProps}
ref={flowViewRef as any}
className={cx(styles.container, className)}
onNodeDragStart={handleNodeDragStart}
Expand All @@ -165,6 +164,7 @@ const FlowView: React.FC<Partial<FlowViewProps>> = (props) => {
fitView
minZoom={minZoom}
maxZoom={maxZoom}
{...flowProps}
>
{miniMap && (
<MiniMap
Expand Down

0 comments on commit ddc8300

Please sign in to comment.