Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic A question about Bounds propert of Diagram.Selection (Read 1082 times)
CanadaProgrammer
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 113
Joined: Jun 30th, 2011
A question about Bounds propert of Diagram.Selection
Apr 19th, 2013 at 8:25pm
Print Post  
On a diagram there is node shape and the bound is (100, 100, 120, 40). User move the shape by the mouse to a new location that is (300, 300). So at this moment the value of Diagram.Selection.Bound is (300, 300, 120, 40). Then execute below code:

shape.Move(200.0f, 200.0f);

Right now the value of Diagram.Selection.Bound still is (300, 300, 120, 40). I think it should be (200, 200, 120, 40). That's why and how to solve it? Thanks a lot.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: A question about Bounds propert of Diagram.Selection
Reply #1 - Apr 22nd, 2013 at 8:37am
Print Post  
Use this method as a work-around:

Code
Select All
void RefreshSelectionBounds()
{
	new InteractionState(diagram.Selection, -1, Action.Create).Cancel(diagram);
}

shape.Move(200,200);
if (shape.Selected)
	RefreshSelectionBounds(); 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint