Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic The diagram is initially trimmed (Read 3545 times)
Santosh
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 28
Joined: Mar 25th, 2015
The diagram is initially trimmed
Sep 28th, 2015 at 11:01am
Print Post  
Hi,

On load of the diagram,

1. The expand(+) button, gets cut marginally. Can we increase the canvas width to adjust this marginally somehow? Or, any other fix?

2. The nodes overlap. Specially the (+) sign is overlapped by another node.

3. There is a small bar above the tabular node.

I added Mindfusion.Common.js, but still dint fix the problem.
  

Err.png ( 30 KB | 112 Downloads )
Err.png
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: The diagram is initially trimmed
Reply #1 - Sep 28th, 2015 at 12:20pm
Print Post  
Hi,

The +/- icon's is not considered part of node's bounds by layout calculations. Its right side is at 5 mm distance from node's right border, so:

1. When calling resizeToFitItems after layout, pass a larger margin argument than 5 (if using default millimeter unit).
2. Set treeLayout.nodeDistance to a larger value too.

I suppose 3 shows the divider line between table's caption-bar and cell area, with CaptionHeight set to 0 and Shape set to RoundedRectangle. We'll fix it for official release to not draw divider when CaptionHeight is 0.

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


I Love MindFusion!

Posts: 28
Joined: Mar 25th, 2015
Re: The diagram is initially trimmed
Reply #2 - Sep 28th, 2015 at 12:39pm
Print Post  
Thanks Stoyo. 1 & 2 are fixed, and working great.

Any temporary solution for 3, till we get the next official release?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: The diagram is initially trimmed
Reply #3 - Sep 28th, 2015 at 1:20pm
Print Post  
Try this:

Code
Select All
var TableNode = MindFusion.Diagramming.TableNode;
var updateCanvasElementsOriginal = TableNode.prototype.updateCanvasElements;

TableNode.prototype.updateCanvasElements = function ()
{
    updateCanvasElementsOriginal.apply(this);
    var content = this.graphicsContainer.content;

    // look for divider Line object
    var index = -1;
    for (var i = 0; i < content.length; i++)
    {
        var contentElement = content[i];
        if (MindFusion.Drawing.Line.isInstanceOfType(contentElement))
        {
            index = i;
            break;
        }
    }

    // remove if found
    if (index > -1)
        content.splice(index, 1);
}; 

  
Back to top
 
IP Logged
 
Santosh
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 28
Joined: Mar 25th, 2015
Re: The diagram is initially trimmed
Reply #4 - Sep 29th, 2015 at 6:11am
Print Post  
The above code gives error:

Code (Javascript)
Select All
Uncaught TypeError: MindFusion.Drawing.Line.isInstanceOfType is not a function 



I tried MindFusion.Drawing.Line.isPrototypeOf(contentElement), but did the line did not get removed.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: The diagram is initially trimmed
Reply #5 - Sep 29th, 2015 at 8:35am
Print Post  
That code was using MS Ajax library. Replace it with this instead:

Code
Select All
if (MindFusion.AbstractionLayer.isInstanceOfType(
    MindFusion.Drawing.Line, contentElement))
{
    index = i;
    break;
} 

  
Back to top
 
IP Logged
 
Santosh
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 28
Joined: Mar 25th, 2015
Re: The diagram is initially trimmed
Reply #6 - Sep 29th, 2015 at 9:18am
Print Post  
that worked! thanks Stoyo  Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint