nies.stephan
unread,Sep 16, 2009, 9:31:25 PM9/16/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to WireIt
Hello all,
I did take a look at the spring layout
and i like it. Since i am thinking
about using it for a callgraph browser
kind of gui i toyed a bit around.
One problem was, that after a switched
on the close button, the Layout would
crash if i would close a node.
I could fix that by placing
this.edges = [];
// Extract wires
for(var i = 0 ; i < this.layer.wires.length ; i++) {
var wire = this.layer.wires[i];
this.edges.push([this.layer.containers.indexOf
(wire.terminal1.container),
this.layer.containers.indexOf
(wire.terminal2.container) ]);
}
inside the run: function() in Layer.js
because otherwise the this.edges doesn't get updated when a Node and
it's edges get removed. Of course it would be even better if the
Container
would inform the layout, so that it doesn't have to check all the
time.
So this then made it possible to click away certain nodes, you are not
interested in. Now the second thing i would like to do is:
Introduce a second button, that if u click it reveals all the direct
neighbours
of a node and the respective edges. That way you could navigate a
huge flowchart (like a callgraph for example) and still have a good
overview.
But i didn't manage to get the second button (the neighbour button)
working
i tried to copy and paste every call to the closeButton and thereby
create
a second button but i failed.
Could someone please explain me how to do it?
Cheers,
Stephan