Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Adjustment handles with custom node (Read 1750 times)
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Adjustment handles with custom node
Nov 6th, 2009 at 6:11am
Print Post  
Hi Stoyo

With V1.2 Beta , in tutorial, I modified the OrgChatNode class and following function added to it to show only four adjustment handles.

I want to hide the center adjustment handle, since I am placing command button over there. Selecting the node hides(overlapes) my small button added in center.

With following function, i am showing only 4 adjustment handles and works correctly when i select the node but when i start moving the node all nine adjustment handles are shown and remains visible after moving node is completed.

       protected override void AddHandlesToCanvas()
       {
           Rect _rect = GetBounds();
           Point[] pointArray = new Point[4];

           pointArray[0] = new Point(_rect.Left, _rect.Top);
           pointArray[1] = new Point(_rect.Right, _rect.Top);
           pointArray[2] = new Point(_rect.Right, _rect.Bottom);
           pointArray[3] = new Point(_rect.Left, _rect.Bottom);

           base.AddHandlesToCanvas(pointArray);
       }

I need to show only 4 adjustment handle when moving operation is in progress and after completion.

-Rajesh
  
Back to top
WWW  
IP Logged
 
rajesh_patil74
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 220
Joined: Sep 3rd, 2009
Re: Adjustment handles with custom node
Reply #1 - Nov 6th, 2009 at 6:31am
Print Post  
Hi Stoyo

I found the fix for same. By implementing following function it gets resolved.


protected override void UpdateVisuals()

{

base.UpdateVisuals();

Rect _rect = GetBounds();
     base.SetRect(_rect);

Point[] pointArray = new Point[4];

pointArray[0] = new Point(_rect.Left, _rect.Top);

pointArray[1] = new Point(_rect.Right, _rect.Top);

pointArray[2] = new Point(_rect.Right, _rect.Bottom);

pointArray[3] = new Point(_rect.Left, _rect.Bottom);


base.UpdateHandlePositions(pointArray);


}

Would you fix this issue in next release, so I don't need to implement this function.

-Regards
Rajesh
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Adjustment handles with custom node
Reply #2 - Nov 6th, 2009 at 9:12am
Print Post  
What we can do is make the UpdateHandlePositions( - no args - ) method public too. It is called during items modification. Your code will still look very similar to what you posted above though...

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint