Commit 6ce3bd34 authored by Jérome Perrin's avatar Jérome Perrin

Support loading graph without nodes coordinates

parent 2ad32db2
......@@ -549,14 +549,16 @@
node_data.name = node_data.name || class_definition.name;
gadget.props.node_container[node_id] = node_data;
if (coordinate !== undefined) {
node_data.coordinate = updateElementCoordinate(
gadget,
node_id,
coordinate
);
if (coordinate === undefined) {
coordinate = {top: 0, left: 0}
}
node_data.coordinate = updateElementCoordinate(
gadget,
node_id,
coordinate
);
// XXX make node template an option, or use CSS from class_definition
/*jslint nomen: true*/
domElement = domParser.parseFromString(
......
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