select node
This commit is contained in:
1 parent
46123a9b83
commit
d2b0584c24
3 files changed
+34
-14
No files matched your search
@@ -33,11 +33,10 @@ class BehaviorTree extends React.Component<BehaviorTreeProps> {
|
||||
initGraph(graph: Graph) {
|
||||
const { onSelectNode } = this.props;
|
||||
graph.on('click', (ev: GraphEvent) => {
|
||||
console.log("click", ev);
|
||||
if (!ev.item) {
|
||||
onSelectNode(null);
|
||||
} else if (ev.item) {
|
||||
onSelectNode(ev.item);
|
||||
} else if (ev.item.getType() == "node") {
|
||||
onSelectNode(ev.item as INode);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user