diff --git a/main-process/MainProcess.tsx b/main-process/MainProcess.tsx
index 814a6ae..9b8bd2c 100644
--- a/main-process/MainProcess.tsx
+++ b/main-process/MainProcess.tsx
@@ -44,6 +44,7 @@ export class MainProcess {
// fullscreenable:false,
// maximizable:false
});
+ this.mainWindow.maximize();
// mainWindow.webContents.openDevTools();
this.mainWindow.loadFile('index.html');
this.mainWindow.on('closed', function () {
diff --git a/render-process/Editor/BehaviorTree.tsx b/render-process/Editor/BehaviorTree.tsx
new file mode 100644
index 0000000..46ed494
--- /dev/null
+++ b/render-process/Editor/BehaviorTree.tsx
@@ -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 (
+
+ );
+ }
+}
\ No newline at end of file
diff --git a/render-process/Editor/Editor.css b/render-process/Editor/Editor.css
index f0d63a7..6ecd243 100644
--- a/render-process/Editor/Editor.css
+++ b/render-process/Editor/Editor.css
@@ -5,19 +5,20 @@
}
.editorBd {
+ width: 100%;
height : 100%;
display: flex;
- background: #fafafa;
+
}
-.editorSidebar,
.editorContent {
- min-width: 500px;
+ /* min-width: 500px; */
height : 100%;
}
.editorSidebar {
- background: #fafafa;
+ /* min-width: 500px; */
+ height : 100%;
overflow-y: auto;
}
diff --git a/render-process/Editor/NodePanel.tsx b/render-process/Editor/NodePanel.tsx
index 4b4f7be..42cd6e0 100644
--- a/render-process/Editor/NodePanel.tsx
+++ b/render-process/Editor/NodePanel.tsx
@@ -13,16 +13,38 @@ interface NodePanelState {
}
-class NodePanel extends React.Component {
+class Panel extends React.Component {
render() {
const { nodes } = this.props;
+ console.log("NodePanel render", nodes);
const node = nodes[0];
- return (
-
- {node ? node.getModel().label : ''}
-
- )
+ if (node) {
+ return (
+
+ {node ? node.getModel().label : ''}
+
+ )
+ } else {
+ return (
+
+ 未选中
+
+ )
+ }
+
}
}
-export default DetailPanel.create('node')(withEditorContext(NodePanel));
\ No newline at end of file
+export default class NodePanel extends React.Component {
+ render() {
+ console.log("NodePanel render");
+ return (
+
+ 未选中fefqwefqwefwewef
+
+ )
+ }
+
+}
+
+// export default DetailPanel.create('node')(withEditorContext(Panel));
\ No newline at end of file
diff --git a/render-process/Editor/index.tsx b/render-process/Editor/index.tsx
index c5d64e9..8bef5cb 100644
--- a/render-process/Editor/index.tsx
+++ b/render-process/Editor/index.tsx
@@ -4,6 +4,7 @@ import { MindData } from 'gg-editor/lib/common/interfaces';
import { Row, Col } from 'antd';
import './Editor.css';
import NodePanel from './NodePanel';
+import BehaviorTree from './BehaviorTree';
export interface EditorProps {
@@ -15,8 +16,7 @@ export default class Editor extends React.Component {
- hello
- {/* */}
+
diff --git a/render-process/components/Hello.tsx b/render-process/components/Hello.tsx
deleted file mode 100644
index 9a11c77..0000000
--- a/render-process/components/Hello.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-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 Hello extends React.Component {
- render() {
- return (
-
-
-
-
- );
- }
-}
-
-function getExclamationMarks(numChars: number) {
- return Array(numChars + 1).join('!');
-}
\ No newline at end of file
diff --git a/render-process/index.tsx b/render-process/index.tsx
index 5ef534d..4016145 100644
--- a/render-process/index.tsx
+++ b/render-process/index.tsx
@@ -114,7 +114,7 @@ export default class Main extends Component {
/>
-
+ */}
+
)