This is how I worked on the problem if anyone is interested: I just put the global stop_layout var in the stableEnergy function. Ugly, but it works. Hooray!
var stop_layout = false;
layout_params = {
name: 'arbor',
stableEnergy: function(energy){
var e = energy;
return (e.max <= 0.5) || (e.mean <= 0.3) || stop_layout;
}
};
source
share