feat(renderer): add onChange

This commit is contained in:
moklick
2019-07-15 18:24:47 +02:00
parent 5f50f4eba3
commit e3b7916b82
12 changed files with 36640 additions and 1890 deletions
+5 -3
View File
@@ -1,5 +1,7 @@
import React, { PureComponent } from 'react';
import Graph from '../src';
// import Graph from '../src';
import Graph from '../dist/ReactGraph';
class App extends PureComponent {
constructor() {
@@ -23,14 +25,14 @@ class App extends PureComponent {
onLoad(graphInstance) {
this.graphInstance = graphInstance;
console.log('graph loaded:', graphInstance);
console.log('graph loaded:', this.graphInstance);
}
onMove() {
if (!this.graphInstance) {
return false;
}
console.log('graph moved');
console.log('graph moved', this.graphInstance.nodes);
}
onFitView() {