Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic OnChildModified not called (Read 1243 times)
Vincent
Junior Member
**
Offline


I Love MindFusion!

Posts: 62
Joined: Oct 3rd, 2013
OnChildModified not called
Dec 3rd, 2013 at 9:57am
Print Post  
Hi,

We use the OnChildModified method to initialize a resize when removing a child node e.g. dragging a child E-shape node out of a parent E-shape (upper half). As I understand it, OnChildModified is only called when the AttachTo method is called on the 2 nodes. I followed this with the debugger and I do see that the parent has a SubordinateGroup with the child node in the AttachedNodes collection and the child has a MasterGroup with the parent as MainItem. However, the OnChildModified isn't called if I drag the child away from the parent (I put a breakpoint in the method). Do you have an idea as to why this doesn't happen?

Code
Select All
protected override void OnChildModified(DiagramNode node, AdjustmentHandles handle)
        {
            base.OnChildModified(node, handle);
            if ((node.GetCenter() - this.GetCenter()).Length > 50)
                SendResizeNodeOnChildRemoveRequest((BRNode) node);
        }
 



The 2 nodes do seem to be attached. After aligning the 2 nodes, if I drag the parent the child also moves accordingly.

Thanks!

Vincent
  
Back to top
 
IP Logged
 
Vincent
Junior Member
**
Offline


I Love MindFusion!

Posts: 62
Joined: Oct 3rd, 2013
Re: OnChildModified not called
Reply #1 - Dec 3rd, 2013 at 11:04am
Print Post  
Never mind, we found the issue. Somehow we removed base.CompleteModify(end, ist); in our override of CompleteModify(end, ist)
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint