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
|
Hi Jason, I have used a project sample you provided me a while that is dealing with creating multiple connection at once. When the user selects a few nodes and drags a connection from once port of it will create connections from ports with the same edge of the other selected node. We have used the code and mostly it works well, but there's we are experiencing an issue (null reference exception) when working with smart scrolling. I have attached a sample project (the same one you sent me with IsVirtualizing set to true and IsSmartScrollingEnabled set to true as well). To reproduce the problem follow this steps: - Drag one node outside of the visible viewport. - Keep two nodes inside the visible viewport. - Select the two nodes inside the visible viewport. - Try creating a connection to that node that is outside of the viewport. An null reference exception is thrown, the source of the exception is somewhere in mindscape's code. I suspect that your guys are virtualizing one of the nodes. Since this is a custom implementation, if you guys can't provide a generic solution - can you at least give me a way to mark a node as not virtualize-able? Thanx, Gili |
|
|
Hi Gili, I'll get back to you about this. -Jason Fauchelle |
|
|
Thanks, I will be waiting, i couldn't find a workaround for this yet. |
|
|
Is there any update on this? Thanks! Gili |
|
|
Hi Gili, I've updated the virtualization logic to keep hold of all selected nodes - where previously it only kept the main selected node. This only applies to nodes that are already in the viewport, so the performance will not be impacted much in cases where you have lots of nodes selected. This works very well in the repro project you sent. I've also fixed an issue you may have noticed where all but one of the adorner lines don't keep up with the mouse. And I threw in a null check for good measure too. All this will be available in the next nightly build. -Jason Fauchelle |
|
|
Jason, I've been investigating this issue for a while and i think i still have an issue with some of the features we are suppose to deliver. I'll try to explain through an example: Say a user zooms out, selects a few instances and then zooms in such that only a few nodes are left in the view port, then the user tries to drag a connection from a certain port and expect connections to be created from all the selected nodes. Since the nodes that got outside of the viewport do not have a GUI element to represent them - connections will only be created for those that are within the viewport. This is of course an issue for us, maybe the naive approach could have been to be able to raise a flag that says do not virtualize selected nodes, but even that isn't enough to handle all the scenarios that we have, i'll explain another feature that we have. We are suppose to let a user drag an existing connection to re-connect it to another target. So - the user needs to be able to select multiple connections and then drag the connections into a different target (by dragging one connection all selected connection should be dragged as well). The implementation should be quite straight forward, when the mouse down one of the connections and starts dragging it all existing connection should be removed and instead the new connection adorners should be drawn from all source connection points. But - the user can grab a connection that comes out of a node that isn't part of the viewport, in such case - we can not force the new connection adorner to show since the node isn't part of the view port and therefore doesn't have a GUI element to represent it. Basically, as far as i can see the only thing that is going to help me is if i can specifically tell Mindscape to force realize a node or temporary exclude a few nodes from the virtualization process until states otherwise. If you guys can't provide such a solution - i would be grateful if you can point me to the code section that deals withe virtualization cause we will probably have to make the change ourselves (unless you have a better suggestion for me, maybe a workaround or such). Thank you! Gili |
|
|
Hi Gili, The first scenario that you mentioned should be handled by the previous change that I made - not virtualizing all selected nodes. Note that we had a build server issue around that time, so it's possible that you don't have that change - apologies for not following up. Please download the latest nightly now and check if your first scenario is working. I'll look into your scenario about connection relocation for you soon. -Jason Fauchelle |
|
|
Hi Gili, Regarding multi-connection-relocation, you mention that you delete the connections, and then I'm guessing you use the same technique for multi-connection-creation to cause new connections to be created - as though the old connections are being relocated to a single place. I'm wondering, would you be fine with not deleting the connections, and instead raise events on the connection relocator thumbs of each connection to move them all at once? Similar to how multi-connection-creation is done, but just dealing with the ConnectionRelocatorThumb instead of the ConnectionPointThumb. I've attached an updated version of the MultiConnectionCreation demo to demonstrate this. In the DragStarted, DragDelta, and DragCompleted methods, there is now an additional section specific to dealing with ConnectionRelocationThumb. It's implemented in a very similar way to how the multi-connection-creation is done. For this to work fully, you'll also need to get the next nightly build with some minor updates I've made to better support this. This will not have a problem with virtualization due to the change I made in the previous nightly that does not virtualize any selected items that were in the viewport. If you're interested, the code that controls this is line 1835 of the DiagramSurface. Let me know if you have any questions about this. -Jason Fauchelle |
|