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
|
I have a large diagram which does not fit on one screen. I need to connect two opposite nodes. But i don't want to zoom out the diagram. How can I make the diagram scroll in the same direction while I'm dragging the connection? |
|
|
Hello Shuraz This feature will be available in the next nightly build which you can download from your account page. To enabled this feature, set the DiagramSurface.IsSmartScrollingEnabled property to true. (Note that this property already exists, but the functionality for your scenario was missing). Jason Fauchelle |
|
|
Hello, Jason. I have just downloaded the latest night build of WpfDiagrams3. I opened the project "QuickStart", set IsSmartScrollingEnabled="True" in the file "MainWindow.xaml", ran the project, placed two nodes far away from each other. But when I tried to connect them, the diagram didn't scroll. Shuraz. |
|
|
Thanks for pointing this out Shuraz I've ported this feature from 2.0 to 3.0 which you can get in the next nightly build. Jason Fauchelle |
|
|
It's all right. Thank you. |
|
|
I have just updated an expired subscription so I am trying to use this function on real diagrams. If the diagram is big (30-40 modules and 100 connections) then autoscroll will pause for some seconds. |
|
|
Hello shuraz I've tried reproducing this in my performance test app containing hundreds of nodes and connections but I did not observe any pause. There was one performance improvement we put into the node style which you'll be overriding with your custom style. I have attached the node style used in 3.0. You'll see it is split into 2 parts. The FullDiagramNodeTemplate will be similar to what you have now. Below this is the actual node style. See that this has a template of it's own to display the node, but is much more simple than the full template. It only has the minimum elements required to display the node and doesn't have any of the interactive controls. The triggers in the style then switch the template when the more heavy template may be needed. Try adopting this technique into your custom style and see if the performance is improved. Jason Fauchelle |
|
|
I have tried to completely delete my custom node style. So there is only default style but the situation is the same. Also there is more precise definition: the usual scrollbar pause too. Update: I've attached a test project with my real styles. You can see a pause while scrolling the diagram. |
|
|
Hello shuraz Thanks for the repro project. The issue comes from the connection bridges feature that was added in version 3.0. Even if you don't display connection bridges, the DiagramSurface still calculates intersections as it doesn't know if the styles will display them or not. Turns out this is too much to handle with your 700+ connections. In the next nightly build you'll find the CanCalculateConnectionIntersections property on the DiagramSurface. Set this to false to disable these intensive calculations. In your repro app you'll find this massively improves the performance of loading the diagram, moving/resizing a node and scrolling the diagram. Jason Fauchelle |
|
|
Thank you, Jason. Really, now this test project is working well. But my real project has not become better. I had to compile the source codes and use a profiler. Than I realized the reason was AStarPathfinder. I have changed the test project so you can reproduce it. |
|
|
Hello The issue here is with each connection trying to be routed around adjacent connections. Our implementation struggles with 700+ connections being aware of each other. It's going to take quite a bit of research to improve the performance of this. I have some interesting ideas, but not enough to implement it right now. In the mean time, you could either work with the ElbowPathfinder, or use the non-parameter AStarPathfinder constructor so that it does not care about connection collisions. Jason Fauchelle |
|
|
Unfortunately, other pathfinders are not suitable for me. They puzzle the diagram too much. I would rather wait for your new ideas. |
|
|
Certainly, for your final product an improved a* pathfinder will be required, but the other pathfinders are to keep the performance issue out of the way while you work on other parts of the application. It will be a while before I can improve it, do you have a release date for finishing your project? |
|
|
Thank you, Jason. Our project has already been released that is why I cannot back to another pathfinder. Shuraz. |
|
|
Jason. Sorry to disturb you, but are there any news? |
|
|
Hello Shuraz Sorry, I've been busy on some other large projects so this is still in the research phase. I'm planning to do some implementation experiments this week. Jason Fauchelle |
|
|
Hello Shuraz I've put some more time into the pathfinder this week. I did some more research and have come up with some promising strategies. I'll be continuing to work on the implementation next week. There are lots of complex parts required to build up the overall algorithm, so still not sure when it will be complete. I'll keep you posted on my progress. Jason Fauchelle |
|
|
Thank you Jason, I'm looking forward to the end of your research. Shuraz. |
|
|
Hello Shuraz Thanks for your patience in this. The next nightly build will include the updated AStarPathfinder which you will find has much improved layout and performance compared to what we had before. The API has not changed at all, so simply create an instance of the pathfinder and pass in the desired connection separation value just as you did before. I used your sample project from this forum threads to test the new algorithm. Before the changes, the application took forever to load and the interaction was lagging to the point where it was unusable. With the new algorithm, loading the diagram is much faster - almost the same as if connection separation was not being used. Dragging a node is now usable, still a little bit lagging, but this is somewhat unavoidable when a single node has almost a hundred connections like in your sample project. In terms of the layout, the connections are arranged and ordered much better than they were before, but please note the arrangement will not always be perfect. Try out the next nightly build and let me know on the off chance that there are any critical issues. Jason Fauchelle |
|
|
Thank you, Jason! I see a great improvement. But there is one more thing I would ask you. If I scroll the scrollbars the diagram is still lagging. Nevertheless it is much more better than it was. |
|
|
Hello Shuraz Great to hear the improvements are working well for you. Further performance improvements will take a while, I'll let you know when this can be done. Jason Fauchelle |
|