This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Imagine node in the diagram that acts like a multicast. This node sends its input to many different output streams. I'd like to have the input come in the Top edge and the outpus leave the Bottom Edge. To make the outputs more visibly distinct, I'd like to have the ConnectionPoints for each outbound connection to have a different X offset. This way, the ConnectionPoints would line up along the bottom edge but not overlap with each other. The number of ConnectionPoints should be expandable. In the case of multicast, I would add a new ConnectionPoint everytime the last one was bound. Note that there are other controls with multiple fixed outputs that would not be expandable.
Looking at the IPositionCalculator interface, this appears to be impossible. There is no version of this interface that either takes the FlowDiagramNode that is the target of the calculation or that provides an index into the ConnectionPoints list. While it doesn't prevent displaying a graph with many outputs, this makes it impossible to provide a reasonable editing experience in those scenarios. After adding the first outbound edge, all you can do is move or delete that one. It is not possible to add another outbound edge. Is there any way we can get this addressed ASAP? I would love to adopt this control, and this appears to be the only blocking factor. |
|
|
I worked on this some more and found a solution to the layout problem. I basically just create a new IPositionCalculatorSelector. What remains are two problems that might be bugs or maybe have some APIs/hooks to manage that I can't seem to find: 1) Even when I adjust the layout so that multiple connection points do not overlap, binding any of the selection points makes it so that only that connection point can be modified. It's as if the others were never there. I think this one might be a bug. 2) I can't get the graph to take a notification that my OutboundConnectionPointsCore list has changed. What I want the diagram to do is re-request the position calculators for every outbound connection when I add a new outbound connection. I have a very sloppy workaround here, which is to remove the node from the graph and then add it back after adding the new connection point. Do I have to do that, or can I somehow get it to reprocess in place? Thanks, -Scott |
|
|
Hi Scott For the second point, at the moment we do not provide a way to do this, but it is indeed something I have been planning to include in a later version. I'm sorry I don't have time at the moment, but we will try to provide fixes for these over this week. Cheers |
|
|
Hello Scott. For your first point here, I'm not quite sure what you mean by selection points. It would be great if you could re-phrase this first problem. As for the second point, I've made a fix for this which should solve your problem. It should be out sometime this week. We'll let you know when this will become available. In advance, this is how you can go about this problem: Be sure to let us know if there is something here you don't quite understand, or if you can't get it to work the way you want once the fix is available. Cheers Jason |
|
|
On the first point, I've attached a sequence of 4 images that illustrate the problem. I'll walkthrought them: 1) I have 2 nodes. Notice that I select the top node and it has 3 output connection points that are aligned along the bottom edge. 2) I grab one of the output connection points and I drag it to one of the input points of the other node 3) I allow the connection points to bind. Notice that the connection is newly created and in edit mode. 4) I select the first node again. I have 2 more output connection points that should be available for binding. However I have no access to them. All I can see is the one binding that I already made. In graph editing scenarios, this makes the ability to have multiple output connection points moot. |
|
|
Ah right, thanks for this explination. The idea is that appart from descision nodes, flow diagramming nodes can only have at most one outbound connection. The other outbound connection points are there to make the position of such outbound connection more flexible. This idea comes straight from the general definition of a "flow diagram" of which we have followed. But by all means you can override this functionality when making your own custom node types. Overriding the FlowDiagramNode.CanOriginateNewConnections property to simply return true will have your problem good and solved. Regards. |
|
|
Also: Cheers Jason |
|
|
We actually handle Undo/Redo on our business objects, so we're covered on that point. Thanks! |
|
|
Hi, Just dropping in on this thread to let you know that we are now publishing nightly builds of the trial edition of flow diagrams here: http://www.mindscape.co.nz/products/wpfflowdiagrams/nightlybuilds.aspx The changes that Jason has made today won't be reflected in that build for another 12 hours when the nightly process runs next, but you should be able to get any updates he has been making there. I hope that helps - sorry to steal the thread, I just though this would be the best place to let you know. John-Daniel Trask |
|
|
[quote user="Jason"] In your custom flow diagram node implementation that can have connection points added to it, provide an ObservableCollection field to store all of the IDiagramConnectionPoints. [/quote] Using this approach, let's say that I want to change the order of my ConnectionPoints (perhaps to better match automatic layout so that the connections don't cross over one another). How would I do that? Just perform a move operation on the underlying ObservableCollection? Does it matter that the inbound and outbound connection points are intermingled in this ObservableCollection? Is that handled by the *Core collections? Separately, when you say "run through your ObservableCollection" do you mean that the *Core collections do not need to be observable? That is, should I recompute the *Core lists each time or should I maintain a observable reference that I synchronize with the main ObservableCollection? Thanks, -Scott |
|
|
Hello Scott For your first point: As for your second point: Cheers Jason |
|
|
Hello Scott I looked into the idea of dynamically changing the position of connection points and have developed a sample on how I went about doing this. This sample will be available from our next nightly build. As a quick explanation of the sample: If your still interested in being able to change the positions of connection points, then have a look at the ConnectionPointRelocation sample when it becomes available. Let us know how it goes or if there is something you don't understand. Cheers |
|