- Welcome, Guest. Please Login or Register
MindFusion  
  Version 2 of our Xamarin Calendar component adds Resource view and support for Universal Windows Platform. Now beta testing spreadsheet component for Java Swing. We have released our Java Swing Pack.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
resizeToFitItems() after Lane node rotating 270degrees crops not corectly.
Read 379 times

tadeus   Offline
YaBB Newbies
*
Posts: 7
I Love MindFusion!


   
     
 
resizeToFitItems() after Lane node rotating 270degrees crops not corectly.
Mar 17th, 2017 at 12:24pm
 
Hello!
I heve created Lane node with RotationAngle = 270.
...
When I call resizeToFitItems() method it crops like Lane is not rotated:
...
How I can resolve this problem?
Thank You.
 
 
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1103
Gender: male
tech.support


   
     
 
Re: resizeToFitItems() after Lane node rotating 270degrees crops not corectly.
Reply #1 - Mar 17th, 2017 at 1:20pm
 
Hi,

It seems we disregard rotation when calculating new diagram bounds, try this as a fix for time being -

Code:
Diagram.prototype.getContentBounds = function ()
{
    var rect = Rect.empty;
    ArrayList.forEach(this.items, function (item)
    {
        if (rect == Rect.empty)
            rect = item.getRotatedBounds();
        else
            rect = rect.union(item.getRotatedBounds());
    });
    return rect;
} 



edit: first getBounds becomes getRotatedBounds too

Regards,
Slavcho
 
 
« Last Edit: Mar 17th, 2017 at 2:58pm by Slavcho »
 
IP Logged    
 
     

tadeus   Offline
YaBB Newbies
*
Posts: 7
I Love MindFusion!


   
     
 
Re: resizeToFitItems() after Lane node rotating 270degrees crops not corectly.
Reply #2 - Mar 20th, 2017 at 12:20pm
 
Thank You, it works.

Best Regards, Tadeus
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print