Commit 70d5fac4 authored by Jérome Perrin's avatar Jérome Perrin Committed by Ioannis Papagiannopoulos

Graph Editor: when data should be loaded ?

parent f95d9d71
......@@ -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