add BehaviorTree

This commit is contained in:
zhandouxiaojiji committed 2020-10-16 11:30:30 +08:00
1 parent 04f329eb7d
commit 30a49ed5d6
7 files changed
+73 -67

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
import * as React from 'react';
import GGEditor, { Mind, RegisterNode } from 'gg-editor';
import { MindData } from 'gg-editor/lib/common/interfaces';
const data: MindData = {
id: "1",
label: 'Central Topic111',
children: [
{
id: "2",
label: 'Main Topic 1',
},
{
id: "3",
label: 'Main Topic 2',
},
{
id: "4",
label: 'Main Topic 3',
},
],
};
export default class BehaviorTree extends React.Component {
render() {
return (
<Mind
style={{ width: "70vw", height: "100vh" }}
graphConfig= {{fitView: true, maxZoom:2, fitViewPadding:[20, 20, 20, 20]}}
data={data}
/>
);
}
}