-
Notifications
You must be signed in to change notification settings - Fork 231
Open
Description
This code below:
Alchemy.prototype.generateLayout = function(instance) {
var a;
a = instance;
return function(start) {
var conf;
if (start == null) {
start = false;
}
conf = a.conf;
a.layout = new Layout(a);
return a.force = d3.layout.force().size([conf.graphWidth(), conf.graphHeight()]).theta(1.0).gravity(a.layout.gravity()).friction(a.layout.friction()).nodes(a.elements.nodes.d3).links(a.elements.edges.d3).linkDistance(function(link) {
return a.layout.linkDistancefn(link);
}).linkStrength(function(link) {
return a.layout.linkStrength(link);
}).charge(a.layout.charge()).chargeDistance(a.layout.chargeDistance());
};
};
Throws the following exception:
Uncaught TypeError: d3.layout.force(...).size(...).theta(...).gravity(...).friction(...).nodes(...).links(...).linkDistance(...).linkStrength(...).charge(...).chargeDistance is not a function
After tinkering around I narrowed it down to:
}).charge(a.layout.charge()). >>> chargeDistance <<< (a.layout.chargeDistance());
Metadata
Metadata
Assignees
Labels
No labels