Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic RestrictItemsToBounds with rotated ShapeNodes (Read 2719 times)
mowe
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Jun 3rd, 2009
RestrictItemsToBounds with rotated ShapeNodes
Jun 3rd, 2009 at 2:31pm
Print Post  
Hi,

I have shapenodes where I load an image and and then use the ResizeToFitImage. These images have a rectangular size. When I rotate the shapenodes by 90° I can drag the nodes out of the bound even with the setting RestrictItemsToBounds = RestrictToBounds.Intersection.

Regards
Joachim
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: RestrictItemsToBounds with rotated ShapeNodes
Reply #1 - Jun 3rd, 2009 at 2:57pm
Print Post  
Yes, it seems the RestrictItemsToBounds check does not consider the shape rotation. You could handle NodeModifying and set e.Cancel = true or call e.CancelDrag if you detect that the rectangle returned by ShapeNode.GetRotatedBounds() is outside Diagram.Bounds.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
mowe
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Jun 3rd, 2009
Re: RestrictItemsToBounds with rotated ShapeNodes
Reply #2 - Jun 4th, 2009 at 7:26am
Print Post  
Yes, it does. That's almost too easy Wink

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