fix drag node

This commit is contained in:
zhandouxiaojiji committed 2020-10-26 18:06:21 +08:00
1 parent 42bda75286
commit 486c11f655
2 files changed
+89 -63

No files matched your search

+4 -5
View File
@@ -3,7 +3,7 @@ import { Card } from 'antd';
import { INode } from '@antv/g6/lib/interface/item';
interface NodePanelProps {
curNode: INode | null;
}
interface NodePanelState {
@@ -15,19 +15,18 @@ export default class Panel extends React.Component<NodePanelProps> {
}
renderNode() {
const { curNode } = this.props;
return (
<div>
{curNode.getModel().label}
{}
</div>
)
}
render() {
const { curNode } = this.props;
// const { curNode } = this.props;
return (
<Card title="节点信息" style={{ height: "100%" }}>
{curNode ? this.renderNode() : "未选中"}
{/* {curNode ? this.renderNode() : "未选中"} */}
</Card>
)
}