I am trying to add a selection of objects (which could be simple nodes or a JGoArea which are linked together) to a JGoArea. This is done when a user marquee selects a collection of Objects on the canvas moves them into a JGoArea. All this is coded in the onMouseUp event.
In the current version of JGo when we try to add the selection, the links are lost. I am able to overcome that using a cut & paste me thods.
But the problem is suppose if a selection has a JGoArea (which contains a complex network of nodes linked together) and I try to add it to a JGoArea … then the selected JGoArea is added fine but the nodes it contains are getting added as children of the outer JGoArea and all links are lost.
Hope I was clear enough in explaining the problem??
Any ideas would be really appreciated
Thanks in advance
JGo version 5.1 adds new methods, JGoArea.addCollection and JGoLayer.addCollection, that don’t unlink links from ports when the ports/nodes are re-parented, say from one area to another one in the same layer, or to the same layer as a top-level object, or from a layer as top-level objects to be children of an area.
Can you send me across the source for the JGoArea.addCollection and JGoLayer.addCollection methods?
I can’t because it’s too dependent on other code changes.
I guess you don’t have a support/subscription for JGo, because you would already have gotten the JGo 5.1 beta. You’ll need to wait for JGo 5.1 and upgrade then.