Commit c517bb8a authored by Jérome Perrin's avatar Jérome Perrin

Graph Editor: when data should be loaded ?

parent 7d8cbc6c
......@@ -688,8 +688,19 @@
})
.declareAcquiredMethod('notifyDataChanged', 'notifyDataChanged')
.declareMethod('render', function (data) {
// var gadget = this;
this.props.data = JSON.parse(data);
this.props.jsplumb_instance = jsPlumb.getInstance();
// XXX data loading is done in startService
/*
$.each(this.props.data.graph.node, function (key, value) {
addNode(gadget, key, value);
});
$.each(this.props.data.graph.edge, function (key, value) {
addEdge(gadget, key, value);
});
*/
})
.declareMethod('getContent', function () {
......@@ -724,6 +735,8 @@
draggable(gadget);
this.props.nodes_click_monitor = RSVP.Monitor();
// load the data
$.each(this.props.data.graph.node, function (key, value) {
addNode(gadget, key, value);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment