Commit 5c6fad39 authored by Jérome Perrin's avatar Jérome Perrin

Support loading graph without nodes coordinates

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