Hi guys,

\n

I'm trying to pick out the edges for a vertex that has multiple edges - one edge has a target vertex in the same 'lane' (or pool) - the other edge has a target vertex in a separate lane/pool

\n

The target for the second vertex always returns as null, when I get the edges using graph.getChildEdges(lane) - I've also tried getting the specific vertex using getCell and then finding the edges that way, but it also returns null for the target.

\n

The graph has been rendered with these two targets linked up correct with edges, but it doesn't appear to work when querying the graph for the target vertices.

\n

I'm using the Javascript API and jQuery to iterate through first the graph.getChildCells(graph.getDefaultParent(), true, false) and then using a second loop on each item returned, "n", using graph,getChildEdges(n) - when it reaches the vertex that has the two targets, the null is encountered.

\n

Any help/tips on this? I can provide a solid code example if this doesn't make sense. It could be that I've put a property on the graph that stops lane 1 from knowing target vertices in lane 2? Or - perhaps I need to interrogate the model in some other way to reliably get ALL edges from Vertex 1 to Vertex 2, despite which lane they are in?

\n

Regards\nSB

asked 01 Jun '11, 08:50

SpaceBison's gravatar image

SpaceBison
115
accept rate: 0%


Does anybody know of a method to find all edges that accurately populates their source & target vertices when using a swimlane graph, ignoring the concept of lanes?

link

answered 01 Jun '11, 23:51

SpaceBison's gravatar image

SpaceBison
115
accept rate: 0%

Just wondering if setConnectable(false) on the lanes themselves would cause this? Will investigate...

(02 Jun '11, 00:15) SpaceBison

I think I've found a workaround for this - I have to get the edges per lane in the swimlanes graph, but also get the edges from graph.getDefaultParent() - which seems to contain any edges that cross-between two lanes.

\n

I think this is slightly odd behaviour, but if it will work then I can fudge my solution!

\n

For example

\n
var edges = graph.getChildEdges(graph.getDefaultParent()); - gets child edges that cross between lanes\nvar laneEdges = graph.getChildEdges(lane) - gets child edges where the vertices are in the specified lane. (need to remove the edge which has the null target)\n
\n

Any thoughts?

link

answered 02 Jun '11, 01:17

SpaceBison's gravatar image

SpaceBison
115
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×228
×100
×79
×25

Asked: 01 Jun '11, 08:50

Seen: 1,836 times

Last updated: 02 Jun '11, 01:17