Dropping icon issues


I have a curious little issue. I pretty much copied the functionality out of the org charter example to allow you to drop one node on top of another node to create a link between the two. Well I used this same functionality with dropping a goballon object on a gonode object. So it simply takes the Selection.Primary.Center, passes it to the PickUnselectedGraphNode function, (which I stole from the orgcharter example) and I get back the node that ive dropped the ballon on, and set it as its anchor point. This works great if I drop the balloons on nodes right off the bat. But if i move a node, and then drop the balloon, I have to drop it at the very bottom edge of the node to get the PickUnselectedGraphNode function to return the node, it just returns null otherwise, and its only after I’ve moved a node, never initially. Should I be calling a refresh or something after I move each node?


That sounds strange. Do you see the same problem behavior when running the OrgCharter sample application?
No refresh should be needed when moving any node (or making any other changes, for that matter).


No Walter I don’t, that example seems to work quite well. I guess the only information I could really add would be that I use multitext nodes, but I do check to see if they happen to dropp the icon on the node, or one of its gotext objects, so I cant believe that is the problem. Is there some way to determine if the rectange of the goballon that im dropping happens to be inside the rectange of the gomultitextnode im dropping on. As opposed to just seeing if the center point is? The part that confuses me the most, is the fact that it only happens after I have moved the node, and im still able to hit the bottom portion of the node, just not the top 80%. Hmmmm
Thanks for the help,


Hey Walter,
This might help, I also implement functionality much like the org charter that allows you to drop one gomultitextnode on top of another to create a relationship between the two. Now that works great regardless of wether I move one of them or not. Is it possible that the center value for the balloon gets offset, or its at an old anchor point or something? Seeing that im using the same function to select the node dropped on?


Well, wouldn’t you know, there’s a bug on our list relating to the size of GoBalloons. That’s probably what you are encountering too. I guess one of us will need to investigate.


Thanks for the help Walter.


Instead of using GoView.Selection.Primary.Center, use GoView.LastInput.DocPoint.