Edge selection with mouse

97 views
Skip to first unread message

Wiki

unread,
Feb 5, 2012, 3:04:04 AM2/5/12
to JavaScript InfoVis Toolkit
I am using InfoVis toolkit in one of my projects, it’s awesome, is
there any way by which I can select an edge with a mouse, I couldn’t
find a way in the documentation.

Waqar

Eric

unread,
Feb 6, 2012, 8:19:59 PM2/6/12
to JavaScript InfoVis Toolkit
I use the Force Directed graph and have my edges selectable. Use
enableForEdges when setting up the events:

Events : {
enable : true,
enableForEdges : true,


then onclick do this:

onClick : function(node, eventInfo, event) {
if (!node) {
return;
}

if (node.nodeFrom) {
// this means an edge has been selected....
var adj = fd.graph.getAdjacence(node.nodeFrom.id,
node.nodeTo.id);

and away you go.

Waqar

unread,
Feb 7, 2012, 12:41:15 AM2/7/12
to javascript-information...@googlegroups.com
Thanks :-)

--
You received this message because you are subscribed to the Google Groups "JavaScript InfoVis Toolkit" group.
To post to this group, send email to javascript-information...@googlegroups.com.
To unsubscribe from this group, send email to javascript-information-visua...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascript-information-visualization-toolkit?hl=en.


Reply all
Reply to author
Forward
0 new messages