Move debug mode so edges are formatted

master
Rohan Vazarkar 2019-03-08 14:46:08 -05:00
parent 4d312271ff
commit 0116980171
2 changed files with 10 additions and 9 deletions

View File

@ -672,9 +672,6 @@ export default class GraphContainer extends Component {
doQueryNative(params) {
this.clearScale();
if (appStore.performance.debug) {
emitter.emit("setRawQuery", params.statement);
}
let nodes = {};
let edges = {};
let session = driver.session();
@ -705,7 +702,11 @@ export default class GraphContainer extends Component {
}
let finaledges = edgearr.join('|');
let statement = params.statement.format(finaledges)
let statement = params.statement.format(finaledges);
if (appStore.performance.debug) {
emitter.emit("setRawQuery", statement);
}
let promises = [];
session.run(statement, params.props).subscribe({
onNext: async function(result) {

View File

@ -30,6 +30,10 @@ export default class About extends Component {
};
}
componentDidMount() {
emitter.on("showAbout", this.openModal.bind(this));
}
closeModal() {
this.setState({ open: false });
}
@ -37,11 +41,7 @@ export default class About extends Component {
openModal() {
this.setState({ open: true });
}
componentDidMount() {
emitter.on("showAbout", this.openModal.bind(this));
}
render() {
return (
<Modal