- Welcome, Guest. Please Login or Register
MindFusion  
  We have released the first version of our spreadsheet component for .NET Windows Forms, which is also a part of MindFusion.WinForms Pack. A demo version is available for download here.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Poll closed Poll
Question: How to get Origin Id
*** This poll has now closed ***


origin id    
  0 (0%)
shape node    
  0 (0%)




Total votes: 0
« Created by: honghuhuang on: Dec 27th, 2011 at 5:22am »

Page Index Toggle Pages: 1 Send Topic Print  
How to get Origin Id
Read 4802 times

honghuhuang   Offline
YaBB Newbies
*
Posts: 1
I love YaBB 1G - SP1!


   
     
 
How to get Origin Id
Dec 27th, 2011 at 5:22am
 
I have a problem and I did not know how to solve it. Who can help me?


The problem is: when I drag two shape nodes to the canvas and connect these two shape nodes , What I want is that when I double click the son shape node ,How can I get the parent shape node id?
 
 
 
IP Logged    
 
     

Stoyo   Offline
YaBB Moderator
*****
Posts: 12504
MindFusion support


   
     
 
Re: How to get Origin Id
Reply #1 - Dec 27th, 2011 at 7:03am
 
Hi,

You could check the incoming links collection of the double-clicked node, and then the origin of the first link:

Code:
var node = e.getNode();
if (node.getIncomingLinks().size() > 0)
{
      var linkFromParent = node.getIncomingLinks().get(0);
      var parent = linkFromParent.getOrigin();
      // do something with origin
} 



I hope that helps,
Stoyan
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print